From 7fa862b71318b4fa8ca944d4a6b7ca73bce58479 Mon Sep 17 00:00:00 2001 From: Jake Langlois Date: Thu, 24 Oct 2024 18:33:18 -0400 Subject: [PATCH] broken but otw --- .../components/Sidebar/GenericSection.tsx | 29 +++++++++++++++---- .../frontend/components/Sidebar/Sidebar.tsx | 2 +- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/packages/frontend/components/Sidebar/GenericSection.tsx b/packages/frontend/components/Sidebar/GenericSection.tsx index 11a14454..4574b61f 100644 --- a/packages/frontend/components/Sidebar/GenericSection.tsx +++ b/packages/frontend/components/Sidebar/GenericSection.tsx @@ -5,12 +5,24 @@ import { } from "@chakra-ui/icons"; import { Box, Flex, Stack, Text } from "@chakra-ui/react"; import { useState } from "react"; +import SectionRequirement from "./SectionRequirement"; +import { IAndCourse2, ScheduleCourse2 } from "@graduate/common"; -interface ClassOptionProps { - type: "NUpath" | "Elective Placeholder"; +// Define the props interface for GenericSection +interface GenericSectionProps { + courseData: { [id: string]: ScheduleCourse2 }; + dndIdPrefix: string; } -const ClassOption: React.FC = ({ type }) => { +// The sample IAndCourse2 requirement object +const andCourseRequirement: IAndCourse2 = { + type: "AND", + courses: [], +}; + +const ClassOption: React.FC<{ type: "NUpath" | "Elective Placeholder" }> = ({ + type, +}) => { return ( {type === "NUpath" ? "NUpath" : "Elective Placeholder"} @@ -18,7 +30,10 @@ const ClassOption: React.FC = ({ type }) => { ); }; -const GenericSection: React.FC = () => { +const GenericSection: React.FC = ({ + courseData, + dndIdPrefix, +}) => { const [opened, setOpened] = useState(false); return ( @@ -92,7 +107,11 @@ const GenericSection: React.FC = () => { > {opened && ( - + )} diff --git a/packages/frontend/components/Sidebar/Sidebar.tsx b/packages/frontend/components/Sidebar/Sidebar.tsx index a0da73cc..2dcce802 100644 --- a/packages/frontend/components/Sidebar/Sidebar.tsx +++ b/packages/frontend/components/Sidebar/Sidebar.tsx @@ -217,7 +217,7 @@ const Sidebar: React.FC = memo( > {courseData && ( <> - +