diff --git a/.gitignore b/.gitignore index 3f6aab3..01dde87 100644 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,5 @@ package-lock.json # Output scripts/output/*.json -coverage/ \ No newline at end of file +coverage +coverage/ diff --git a/src/components/ExplorerLegend.tsx b/src/components/ExplorerLegend.tsx index 8f5cc7a..297c09b 100644 --- a/src/components/ExplorerLegend.tsx +++ b/src/components/ExplorerLegend.tsx @@ -9,7 +9,7 @@ export default function ExplorerLegend() { const boxClass = 'w-9 h-4 border-2 self-center rounded'; return ( -
+
+ + +
setSelectedCourse(null)} diff --git a/src/store/explorerStore.ts b/src/store/explorerStore.ts index f259594..d58baf8 100644 --- a/src/store/explorerStore.ts +++ b/src/store/explorerStore.ts @@ -6,6 +6,8 @@ interface ExplorerState { selectedCourse: string | null; highlightedSet: Set; setSelectedCourse: (code: string | null) => void; + showAllCourses: boolean; + toggleShowAllCourses: () => void; } export const useExplorerStore = create((set) => ({ @@ -23,4 +25,7 @@ export const useExplorerStore = create((set) => ({ ...getDescendants(code, prereqEdges), ]), }), + showAllCourses: false, + toggleShowAllCourses: () => + set((state) => ({ showAllCourses: !state.showAllCourses })), }));