7
7
Dialog ,
8
8
DialogActions ,
9
9
DialogContent ,
10
- DialogContentText ,
11
- useMediaQuery
10
+ DialogContentText
12
11
} from '@material-ui/core' ;
13
12
// import Avatar from '@material-ui/core/Avatar';
14
13
import AvatarGroup from '@material-ui/lab/AvatarGroup' ;
@@ -18,7 +17,6 @@ import { useSelector } from 'react-redux';
18
17
import { useHistory , useParams } from 'react-router' ;
19
18
import DrawerLayout from 'src/layouts/DrawerLayout' ;
20
19
import { firebase } from 'src/services/authService' ;
21
- import { useTheme } from '@material-ui/core/styles' ;
22
20
import { BookmarkBorder , Bookmark } from '@material-ui/icons' ;
23
21
import { SnackbarProvider , useSnackbar } from 'notistack' ;
24
22
import Loader from 'src/components/Loader' ;
@@ -60,27 +58,50 @@ const useStyles = makeStyles(theme => ({
60
58
color : 'black' ,
61
59
fontSize : '32px' ,
62
60
[ theme . breakpoints . down ( 'sm' ) ] : {
63
- fontSize : '26px '
61
+ fontSize : '30px '
64
62
} ,
65
63
[ theme . breakpoints . down ( 'xs' ) ] : {
66
- fontSize : '22px ' ,
64
+ fontSize : '30px ' ,
67
65
marginBottom : '10px'
68
66
}
69
67
} ,
70
-
68
+ buttons : {
69
+ display : 'flex' ,
70
+ gap : '10px' ,
71
+ [ theme . breakpoints . down ( 'xs' ) ] : {
72
+ flexDirection : 'column'
73
+ }
74
+ } ,
75
+ buttonHeading : {
76
+ color : '#fff' ,
77
+ fontWeight : 'bold' ,
78
+ [ theme . breakpoints . down ( 'xs' ) ] : {
79
+ fontSize : '0.85rem'
80
+ }
81
+ } ,
71
82
register : {
72
83
width : '160px' ,
73
84
backgroundColor : '#291757' ,
74
85
borderRadius : '20px' ,
75
86
marginTop : 12 ,
76
- marginBottom : 16
87
+ marginBottom : 16 ,
88
+ [ theme . breakpoints . down ( 'xs' ) ] : {
89
+ width : '120px' ,
90
+ marginBottom : 0 ,
91
+ marginTop : 0
92
+ }
77
93
} ,
78
94
attending : {
79
95
width : '160px' ,
80
96
backgroundColor : '#576886' ,
81
97
borderRadius : '20px' ,
82
98
marginTop : 12 ,
83
- marginBottom : 16
99
+ marginBottom : 16 ,
100
+ [ theme . breakpoints . down ( 'xs' ) ] : {
101
+ width : '120px' ,
102
+ marginBottom : 0 ,
103
+ marginTop : 0
104
+ }
84
105
} ,
85
106
desc : {
86
107
marginTop : '10px' ,
@@ -155,8 +176,6 @@ export default function IndividualEvent() {
155
176
// For Attending
156
177
const [ open , setOpen ] = useState ( false ) ;
157
178
const [ attending , setAttending ] = useState ( false ) ;
158
- const theme = useTheme ( ) ;
159
- const fullScreen = useMediaQuery ( theme . breakpoints . down ( 'sm' ) ) ;
160
179
161
180
const handleClickOpen = ( ) => {
162
181
setOpen ( true ) ;
@@ -224,7 +243,6 @@ export default function IndividualEvent() {
224
243
{ ! loading ? (
225
244
< >
226
245
< Dialog
227
- fullScreen = { fullScreen }
228
246
open = { open }
229
247
onClose = { handleClose }
230
248
aria-labelledby = "responsive-dialog-title"
@@ -269,14 +287,12 @@ export default function IndividualEvent() {
269
287
< Typography className = { classes . introduction } variant = "h1" >
270
288
{ event ?. eventName }
271
289
</ Typography >
272
- < Grid item style = { { display : 'flex' , gap : '10px' } } >
290
+ < Grid item className = { classes . buttons } >
273
291
< Button
274
292
href = { event ?. eventLink }
275
293
className = { classes . register }
276
294
>
277
- < Typography
278
- style = { { color : '#fff' , fontWeight : 'bold' } }
279
- >
295
+ < Typography className = { classes . buttonHeading } >
280
296
Register
281
297
</ Typography >
282
298
</ Button >
@@ -287,9 +303,7 @@ export default function IndividualEvent() {
287
303
}
288
304
disabled = { attending }
289
305
>
290
- < Typography
291
- style = { { color : '#fff' , fontWeight : 'bold' } }
292
- >
306
+ < Typography className = { classes . buttonHeading } >
293
307
{ attending ? 'Attending' : 'Attend' }
294
308
</ Typography >
295
309
</ Button >
0 commit comments