diff --git a/app/admin/page.tsx b/app/admin/page.tsx index 0780e01..1d0af0b 100644 --- a/app/admin/page.tsx +++ b/app/admin/page.tsx @@ -101,7 +101,7 @@ export default function AdminPage() {
diff --git a/app/layout.tsx b/app/layout.tsx index 5f90469..0cf892b 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -52,9 +52,9 @@ export default function RootLayout({ defaultTheme: "dark", }} > -
+
-
+
{children}
diff --git a/app/page.tsx b/app/page.tsx index 042d20a..be35fde 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -104,18 +104,18 @@ async function Home(props: any) { return ( <> -
-
-
-
+
+
+
+
-
+
{props.fullCourseList}
-
+
diff --git a/components/CourseCard.tsx b/components/CourseCard.tsx index def22bb..673e246 100644 --- a/components/CourseCard.tsx +++ b/components/CourseCard.tsx @@ -53,10 +53,10 @@ export default function CourseCard(props: any) { return (
-

{item[0]}

+

{item[0]}

); } @@ -87,47 +87,47 @@ export default function CourseCard(props: any) { updatePlan(props.course)}>
-

+

{props.course.courseTitle.replace("&", "&")}

-

+

{props.course.subject} {props.course.courseNumber} |{" "} - {props.course.creditHours} credit(s) |   + {props.course.creditHours} credit(s) {props.course.sectionAttributes.length > 0 && ( -
{attributeCodes}
+
 | {attributeCodes}
)}

-
- +
+
+ +
- updatePlan(props.course)} - > + updatePlan(props.course)}>
-
+
{props.course.facultyMeet.meetingTimes.room ? ( -
-
+
+
{props.course.facultyMeet.meetingTimes.buildingDescription}{" "} {props.course.facultyMeet.meetingTimes.room}
-
+
{props.course.facultyMeet.meetingTimes ? ( -
+
{" "} {props.course.facultyMeet.meetingTimes.beginTime.slice( @@ -153,21 +153,21 @@ export default function CourseCard(props: any) {
) : ( -
+

Contact your Professor for additional details.

)}
-
{coloredDays}
+
{coloredDays}
-
Instructor
-
+
Instructor
+
{props.course.instructor.displayName.replace("'", "'")}
@@ -181,15 +181,15 @@ export default function CourseCard(props: any) { )}
{props.course.seatsAvailable == 0 ? ( -
-
+
+
No available seats left for this section
) : ( -
-
+
+
Seats Available: {props.course.seatsAvailable}
diff --git a/components/CreatePlan.tsx b/components/CreatePlan.tsx index e754c09..ddabb33 100644 --- a/components/CreatePlan.tsx +++ b/components/CreatePlan.tsx @@ -10,12 +10,13 @@ import { import AddIcon from "@mui/icons-material/Add"; import DeleteIcon from "@mui/icons-material/Delete"; import IosShareIcon from "@mui/icons-material/IosShare"; +import ExpandLessIcon from '@mui/icons-material/ExpandLess'; import axios from "axios"; import { Select, SelectItem } from "@nextui-org/react"; import { useRouter } from "next/navigation"; import { usePathname } from "next/navigation"; import { useSession } from "next-auth/react"; -import { useEffect, useState } from "react"; +import { useEffect, useRef, useState } from "react"; import useSWR from "swr"; import { useCookies } from "next-client-cookies"; @@ -25,6 +26,7 @@ import { generateColorFromName } from "../components/primitives"; export default function CreatePlan(props: any) { const cookies = useCookies(); const router = useRouter(); + const scrollRef = useRef(null); const pathname = usePathname(); const { data: session, status } = useSession(); @@ -163,12 +165,22 @@ export default function CreatePlan(props: any) { return output; }; + const scrollToPlan = () => { + if (scrollRef.current) + scrollRef.current.scrollIntoView({behavior: 'smooth', inline: "start"}); + } + return ( <> - - -
-
Create a Plan
+ + +
+
+
Create a Plan
+ +
-
+
or
@@ -227,7 +239,7 @@ export default function CreatePlan(props: any) {
diff --git a/components/Search.tsx b/components/Search.tsx index f0d8efb..f608ec1 100644 --- a/components/Search.tsx +++ b/components/Search.tsx @@ -134,10 +134,10 @@ export default function Search(props: any) { }; return ( -
+