-
+
@@ -23,6 +26,15 @@ const Sidebar = () => {
+
)
}
diff --git a/src/components/planner/sidebar/CoursesController/ClassItem.tsx b/src/components/planner/sidebar/CoursesController/ClassItem.tsx
index b8bc0332..538ca658 100644
--- a/src/components/planner/sidebar/CoursesController/ClassItem.tsx
+++ b/src/components/planner/sidebar/CoursesController/ClassItem.tsx
@@ -74,4 +74,4 @@ const ClassItem = ({ course_id, classInfo, onSelect, onMouseEnter, onMouseLeave
)
}
-export default ClassItem
+export default ClassItem
\ No newline at end of file
diff --git a/src/components/planner/sidebar/sessionController/CoursePicker.tsx b/src/components/planner/sidebar/sessionController/CoursePicker.tsx
index 6aa5116b..9a2b2622 100644
--- a/src/components/planner/sidebar/sessionController/CoursePicker.tsx
+++ b/src/components/planner/sidebar/sessionController/CoursePicker.tsx
@@ -15,9 +15,9 @@ import { ClearAllCoursesButton } from './course-picker/ClearAllCoursesButton'
//TODO: absolute imports with @
+
const CoursePicker = () => {
const { pickedCourses, setPickedCourses, checkboxedCourses, setChoosingNewCourse, setCoursesInfo, ucsModalOpen, setUcsModalOpen } = useContext(CourseContext)
-
const [selectedMajor, setSelectedMajor] = useState
(StorageAPI.getSelectedMajorStorage());
const { courseUnits, loading: loadingCourseUnits } = useCourseUnits(selectedMajor ? selectedMajor.id : null);
const showContent = selectedMajor || pickedCourses.length > 0
diff --git a/src/pages/TimeTableSelector.tsx b/src/pages/TimeTableSelector.tsx
index 9eb6f343..4e140c27 100644
--- a/src/pages/TimeTableSelector.tsx
+++ b/src/pages/TimeTableSelector.tsx
@@ -5,6 +5,7 @@ import { Schedule, Sidebar } from '../components/planner'
import { CourseInfo, Major } from '../@types'
import MajorContext from '../contexts/MajorContext'
import CourseContext from '../contexts/CourseContext'
+import { useSidebarContext } from '../components/layout/SidebarPosition'
const TimeTableSelectorPage = () => {
const [majors, setMajors] = useState([])
@@ -12,6 +13,7 @@ const TimeTableSelectorPage = () => {
const [pickedCourses, setPickedCourses] = useState(StorageAPI.getPickedCoursesStorage());
const [checkboxedCourses, setCheckboxedCourses] = useState(StorageAPI.getPickedCoursesStorage());
const [ucsModalOpen, setUcsModalOpen] = useState(false);
+ const { sidebarPosition } = useSidebarContext();
//TODO: Looks suspicious
const [choosingNewCourse, setChoosingNewCourse] = useState(false);
@@ -21,6 +23,8 @@ const TimeTableSelectorPage = () => {
setMajors(majors)
})
}, [])
+
+
return (
{
}
}>
- {/* Schedule Preview */}
-
-
+ {sidebarPosition === 'left' ?(
+ <>
+
+
+
+
+
+
+ >
+ ) : (
+ <>
+
-
-
-
-
+
+
+
+
+ >
+ )}
- )
-}
+ );
+};
+
-export default TimeTableSelectorPage;
+export default TimeTableSelectorPage;
\ No newline at end of file