Skip to content

Commit

Permalink
converted classbox.js to tsx (#1095)
Browse files Browse the repository at this point in the history
* updated dependencies

* convert ClassBox.js to ClassBox.tsx
  • Loading branch information
nwang03 authored Nov 1, 2023
1 parent 7e79e88 commit 38e769b
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 2 deletions.
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 @@ -24,7 +24,6 @@ const ConfirmLeaveModal = function (props) {
uid,
cid,
};

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

0 comments on commit 38e769b

Please sign in to comment.