Skip to content

Commit

Permalink
fix CI build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
NishchintDhawan committed Jun 5, 2022
1 parent 87ad861 commit c07706c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/lib/hooks/useSavedCourses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ export const useSavedCourses = (): SavedCourses => {

const updateCourseColor = useCallback(
(pid: string, term: string, color: string) => {
data.map((item) => {
if (item.term == term && item.pid == pid) {
data.some((item) => {
if (item.term === term && item.pid === pid) {
item.color = color;
}
});
setData(data);
},
[data]
[data, setData]
);
/**
* Checks the equality of two courses
Expand Down
2 changes: 1 addition & 1 deletion src/pages/scheduler/components/CourseCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export function CourseCard({
(color: string) => {
handleColorChange({ term, code, subject, pid, color });
},
[code, handleDelete, pid, subject, term, color]
[code, handleColorChange, pid, subject, term, color]
);

const onShowSections = useCallback(() => {
Expand Down

0 comments on commit c07706c

Please sign in to comment.