Skip to content

Commit

Permalink
fix: initial course list value
Browse files Browse the repository at this point in the history
  • Loading branch information
AyanoT1 committed Dec 16, 2024
1 parent 29b7ab3 commit 4efe62d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Searchbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import Course from "./Course";

export default function Searchbar() {
const [currentList, setCourses] = useState(
Object.keys({ ...Mandatory, ...Optionals })
Object.keys({ ...Mandatory, ...Optionals }).filter((x) => {
return { ...Mandatory, ...Optionals }[x].desc != "";
})
);
const [currentSource, setSource] = useState({ ...Mandatory, ...Optionals });
const [sortBy, setSortBy] = useState("code");
Expand Down

0 comments on commit 4efe62d

Please sign in to comment.