Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

converted classbox.js to tsx #1095

Merged
merged 3 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"prod_build": "cross-env REACT_APP_FS_PROJ=prod REACT_APP_SERVER_TYPE=prod react-scripts build"
},
"devDependencies": {
"@types/react-router-dom": "^5.3.3",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"enzyme": "^3.11.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@ import React from 'react';
import { Link } from 'react-router-dom';
import '../../../styles/ClassBox.scss';

interface ClassBoxProps {
deleteFunc: () => void;
img: string;
instructorString: string;
name: string;
redirFunc: () => void;
showLeaveButton: JSX.Element;
}

const ClassBox = function ({
deleteFunc, img, instructorString, name, redirFunc, showLeaveButton,
}) {
}: ClassBoxProps) {
const leaveButton = showLeaveButton ? (
<div
className="p-2 text-center"
Expand Down
1 change: 0 additions & 1 deletion src/components/Classes/components/ConfirmLeaveModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
} from 'reactstrap';
import * as fetch from '../../../lib/fetch';

const ConfirmLeaveModal = function (props) {

Check warning on line 8 in src/components/Classes/components/ConfirmLeaveModal.js

View workflow job for this annotation

GitHub Actions / lint (16.x)

Unexpected unnamed function
const {
isOpen, uid, cid, removeStudentClass, className, inClass, unsetClass,
} = props;
Expand All @@ -24,7 +24,6 @@
uid,
cid,
};

try {
// Note: leaveClass doesn't currently return anything.
fetch
Expand Down
Loading