@@ -14,6 +14,17 @@ const CourseSelector = ({ degree, handleChange, setDegree }) => {
14
14
const classes = useStyles ( ) ;
15
15
const Desktop = useMediaQuery ( theme . breakpoints . up ( 'sm' ) ) ;
16
16
17
+ const degrees = [
18
+ 'B.Tech' ,
19
+ 'M.Tech' ,
20
+ 'M.Tech (Research)' ,
21
+ 'Dual Degree M.Tech' ,
22
+ 'M.Sc' ,
23
+ 'Integrated M.Sc' ,
24
+ 'PhD' ,
25
+ 'School Of Management' ,
26
+ ] ;
27
+
17
28
return (
18
29
< >
19
30
{ Desktop ? (
@@ -23,6 +34,7 @@ const CourseSelector = ({ degree, handleChange, setDegree }) => {
23
34
</ Typography >
24
35
< div className = { classes . radioWrapper } >
25
36
< div
37
+ key = { 'All Degrees' }
26
38
style = { {
27
39
display : 'flex' ,
28
40
flexDirection : 'row' ,
@@ -32,42 +44,98 @@ const CourseSelector = ({ degree, handleChange, setDegree }) => {
32
44
< div className = { classes . radioButton } >
33
45
< input
34
46
type = 'radio'
35
- checked = { degree === 'B.Tech ' }
47
+ checked = { degree === 'All Degrees ' }
36
48
onChange = { handleChange }
37
- value = 'B.Tech'
49
+ value = { 'All Degrees' }
38
50
className = { classes . radio }
39
51
/>
40
52
</ div >
41
53
< Typography variant = 'body1' className = { classes . radioText } >
42
- B.Tech
54
+ { 'All Degrees' }
43
55
</ Typography >
44
56
</ div >
45
- < div
46
- style = { {
47
- display : 'flex' ,
48
- flexDirection : 'row' ,
49
- alignItems : 'center' ,
50
- } }
51
- >
52
- < div className = { classes . radioButton } >
53
- < input
54
- type = 'radio'
55
- checked = { degree === 'M.Tech' }
56
- onChange = { handleChange }
57
- value = 'M.Tech'
58
- className = { classes . radio }
59
- />
57
+ { degrees . map ( ( deg ) => (
58
+ < div
59
+ key = { deg }
60
+ style = { {
61
+ display : 'flex' ,
62
+ flexDirection : 'row' ,
63
+ alignItems : 'center' ,
64
+ } }
65
+ >
66
+ < div className = { classes . radioButton } >
67
+ < input
68
+ type = 'radio'
69
+ checked = { degree === deg }
70
+ onChange = { handleChange }
71
+ value = { deg }
72
+ className = { classes . radio }
73
+ // TODO: remove after implementation
74
+ disabled
75
+ />
76
+ </ div >
77
+ < Typography variant = 'body1' className = { classes . radioText } >
78
+ { deg }
79
+ </ Typography >
60
80
</ div >
61
- < Typography variant = 'body1' className = { classes . radioText } >
62
- M.Tech
63
- </ Typography >
64
- </ div >
81
+ ) ) }
82
+ { /* // <div
83
+ // style={{
84
+ // display: 'flex',
85
+ // flexDirection: 'row',
86
+ // alignItems: 'center',
87
+ // }}
88
+ // >
89
+ // <div className={classes.radioButton}>
90
+ // <input
91
+ // type='radio'
92
+ // checked={degree === 'B.Tech'}
93
+ // onChange={handleChange}
94
+ // value='B.Tech'
95
+ // className={classes.radio}
96
+ // />
97
+ // </div>
98
+ // <Typography variant='body1' className={classes.radioText}>
99
+ // B.Tech
100
+ // </Typography>
101
+ // </div>
102
+ // <div
103
+ // style={{
104
+ // display: 'flex',
105
+ // flexDirection: 'row',
106
+ // alignItems: 'center',
107
+ // }}
108
+ // >
109
+ // <div className={classes.radioButton}>
110
+ // <input
111
+ // type='radio'
112
+ // checked={degree === 'M.Tech'}
113
+ // onChange={handleChange}
114
+ // value='M.Tech'
115
+ // className={classes.radio}
116
+ // />
117
+ // </div>
118
+ // <Typography variant='body1' className={classes.radioText}>
119
+ // M.Tech
120
+ // </Typography>
121
+ // </div> */ }
65
122
</ div >
66
123
</ >
67
124
) : (
68
125
< >
69
126
< div className = { classes . placementWrapper } >
70
127
< div
128
+ className = { classes . switch }
129
+ onClick = { ( ) => setDegree ( 'All' ) }
130
+ style = { {
131
+ backgroundColor : degree === 'B.Tech' ? 'unset' : '#006DCC' ,
132
+ color : degree === 'B.Tech' ? 'black' : 'white' ,
133
+ } }
134
+ >
135
+ < Typography variant = 'body1' > All </ Typography >
136
+ </ div >
137
+ { /* TODO: implement */ }
138
+ { /* <div
71
139
className={classes.switch}
72
140
onClick={() => setDegree('B.Tech')}
73
141
style={{
@@ -86,7 +154,7 @@ const CourseSelector = ({ degree, handleChange, setDegree }) => {
86
154
}}
87
155
>
88
156
<Typography variant='body1'> M.Tech </Typography>
89
- </ div >
157
+ </div> */ }
90
158
</ div >
91
159
</ >
92
160
) }
@@ -118,10 +186,13 @@ const useStyles = makeStyles(() => ({
118
186
width : '8px' ,
119
187
height : '8px' ,
120
188
appearance : 'none' ,
189
+ // TODO: remove after implementation
190
+ backgroundColor : 'lightgrey' ,
121
191
'&:checked' : {
122
192
backgroundColor : theme . palette . primary . blue50 ,
123
193
} ,
124
194
} ,
195
+
125
196
radioText : {
126
197
marginLeft : '4px' ,
127
198
fontSize : '18px' ,
0 commit comments