Skip to content

Commit

Permalink
refactor: remove any types and keys using math.random()
Browse files Browse the repository at this point in the history
  • Loading branch information
corypride committed Sep 18, 2024
1 parent f5fefca commit fe9b79e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/Pages/MyCourses.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default function MyCourses() {
: ''
}
onClick={() => setActiveTab(TabType[key])}
key={Math.random()}
key={key}
>
{key}
</button>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/Pages/StudentDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ export default function StudentDashboard() {
<div className="flex flex-col gap-3">
{userData.enrollments ? (
userData?.enrollments?.map(
(course: CurrentEnrollment) => {
(course: CurrentEnrollment, index) => {
return (
<CurrentlyEnrolledClass
course={course}
key={Math.random()}
key={index}
/>
);
}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ export interface Link {
}

export interface Resource {
id: number;
name: string;
links: Array<Link>;
rank: number;
Expand Down

0 comments on commit fe9b79e

Please sign in to comment.