Skip to content
Merged
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
16 changes: 8 additions & 8 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function App() {
const reorder = <T,>(
list: T[],
startIndex: number,
endIndex: number
endIndex: number,
): T[] => {
const result = [...list];
const [removed] = result.splice(startIndex, 1);
Expand Down Expand Up @@ -70,7 +70,7 @@ function App() {

if (sInd === "toolbox" && dInd === "toolbox") {
setToolboxCourses((prev) =>
reorder(prev, source.index, destination.index)
reorder(prev, source.index, destination.index),
);
return;
}
Expand All @@ -94,11 +94,11 @@ function App() {
courseList: reorder(
semester.courseList,
source.index,
destination.index
destination.index,
),
}
: semester
)
: semester,
),
);
return;
}
Expand Down Expand Up @@ -179,15 +179,15 @@ function App() {
};
}
return semester;
})
}),
);

setToolboxCourses((prev) =>
prev
.map((c) =>
c.name === courseToClone.name ? { ...c, count: c.count - 1 } : c
c.name === courseToClone.name ? { ...c, count: c.count - 1 } : c,
)
.filter((c) => c.count > 0)
.filter((c) => c.count > 0),
);
}

Expand Down