@@ -3,13 +3,12 @@ import { useEffect, useContext } from 'react'
3
3
import { Sidebar } from '../components/planner'
4
4
import { Major } from '../@types'
5
5
import MajorContext from '../contexts/MajorContext'
6
- import CourseContext from '../contexts/CourseContext'
7
6
import { useSidebarContext } from '../components/layout/SidebarPosition'
8
7
import { SidebarProvider } from '../components/layout/SidebarPosition'
9
8
import PlannerSchedule from '../components/planner/schedule/PlannerSchedule'
10
9
11
10
const TimeTableSelectorPage = ( ) => {
12
- const { setMajors} = useContext ( MajorContext ) ;
11
+ const { setMajors } = useContext ( MajorContext ) ;
13
12
14
13
// fetch majors when component is ready
15
14
useEffect ( ( ) => {
@@ -20,21 +19,9 @@ const TimeTableSelectorPage = () => {
20
19
} , [ ] )
21
20
22
21
return (
23
- < MajorContext . Provider value = { { majors, setMajors } } >
24
- < CourseContext . Provider value = {
25
- {
26
- pickedCourses, setPickedCourses,
27
- coursesInfo, setCoursesInfo,
28
- checkboxedCourses, setCheckboxedCourses,
29
- choosingNewCourse, setChoosingNewCourse,
30
- ucsModalOpen, setUcsModalOpen
31
- }
32
- } >
33
- < SidebarProvider >
34
- < Content />
35
- </ SidebarProvider >
36
- </ CourseContext . Provider >
37
- </ MajorContext . Provider >
22
+ < SidebarProvider >
23
+ < Content />
24
+ </ SidebarProvider >
38
25
) ;
39
26
} ;
40
27
@@ -43,22 +30,22 @@ const Content = () => {
43
30
44
31
return (
45
32
< div className = "grid w-full grid-cols-12 gap-x-4 gap-y-4 px-4 py-4" >
46
- { sidebarPosition === 'left' ?(
33
+ { sidebarPosition === 'left' ? (
47
34
< >
48
35
< div className = 'col-span-12 lg:col-span-3 min-h' >
49
36
< Sidebar />
50
37
</ div >
51
38
< div className = 'col-span-12 lg:col-span-9 min-h rounded-md bg-lightest px-3 py-3 dark:bg-dark 2xl:px-5 2xl:py-5' >
52
- < Schedule />
39
+ < PlannerSchedule />
53
40
</ div >
54
41
</ >
55
42
) : (
56
43
< >
57
44
< div className = 'col-span-12 lg:col-span-9 min-h rounded-md bg-lightest px-3 py-3 dark:bg-dark 2xl:px-5 2xl:py-5' >
58
- < Schedule />
45
+ < PlannerSchedule />
59
46
</ div >
60
47
< div className = 'col-span-12 lg:col-span-3 min-h' >
61
- < Sidebar />
48
+ < Sidebar />
62
49
</ div >
63
50
</ >
64
51
) }
0 commit comments