@@ -16,27 +16,20 @@ import {
1616 Chip ,
1717} from '@mui/material' ;
1818import { useNavigate } from 'react-router-dom' ;
19- import { useAuthStore , mockLogin } from '../store/useAuthStore' ;
19+ import { useAuthStore } from '../store/useAuthStore' ;
2020import { appConfig } from '../config/app' ;
2121import SportsIcon from '@mui/icons-material/Sports' ;
2222import PeopleIcon from '@mui/icons-material/People' ;
2323import EventIcon from '@mui/icons-material/Event' ;
2424import SecurityIcon from '@mui/icons-material/Security' ;
25- import RocketLaunchIcon from '@mui/icons-material/RocketLaunch' ;
2625import { tokens } from '../styles/theme' ;
27- import { goLogin , goSignup } from '../auth/hostedUi' ;
2826
2927export default function HomePage ( ) {
3028 const navigate = useNavigate ( ) ;
3129 const theme = useTheme ( ) ;
3230 const isMobile = useMediaQuery ( theme . breakpoints . down ( 'md' ) ) ;
3331 const { isAuthenticated, user } = useAuthStore ( ) ;
3432
35- const handleMockLogin = ( userType : 'admin' | 'user' ) => {
36- mockLogin ( userType ) ;
37- navigate ( '/matches' ) ;
38- } ;
39-
4033 const features = [
4134 {
4235 icon : < SportsIcon sx = { { fontSize : 32 , color : tokens . colors . primary [ 600 ] } } /> ,
@@ -242,142 +235,18 @@ export default function HomePage() {
242235 </ Stack >
243236 </ Paper >
244237 ) : (
245- < Stack spacing = { 4 } alignItems = "center" >
246- < Paper
247- sx = { {
248- p : 4 ,
249- maxWidth : 420 ,
250- background : 'rgba(255, 255, 255, 0.95)' ,
251- backdropFilter : 'blur(10px)' ,
252- boxShadow : tokens . shadows . lg ,
253- border : `1px solid ${ tokens . colors . neutral [ 200 ] } ` ,
254- borderRadius : tokens . borderRadius . xl ,
255- } }
256- >
257- < Stack alignItems = "center" spacing = { 3 } >
258- < Box
259- sx = { {
260- width : 48 ,
261- height : 48 ,
262- borderRadius : '50%' ,
263- background : tokens . gradients . secondary ,
264- display : 'flex' ,
265- alignItems : 'center' ,
266- justifyContent : 'center' ,
267- boxShadow : tokens . shadows . md ,
268- } }
269- >
270- < RocketLaunchIcon sx = { { fontSize : 24 , color : 'white' } } />
271- </ Box >
272-
273- < Box textAlign = "center" >
274- < Typography
275- variant = "h6"
276- gutterBottom
277- sx = { { fontWeight : 700 , color : tokens . colors . neutral [ 900 ] } }
278- >
279- ๐ ๋ฐ๋ชจ ์ฒดํํ๊ธฐ
280- </ Typography >
281- < Typography
282- variant = "body2"
283- color = "text.secondary"
284- sx = { { mb : 3 , fontWeight : 500 } }
285- >
286- ์ค์ ์ธ์ฆ ์์ด ๋ฐ๋ก ์ฒดํํด๋ณด์ธ์
287- { appConfig . useMockData && (
288- < span
289- style = { {
290- display : 'block' ,
291- marginTop : 4 ,
292- fontSize : '0.75rem' ,
293- color : tokens . colors . warning [ 600 ] ,
294- } }
295- >
296- (Mock ๋ฐ์ดํฐ ์ฌ์ฉ ์ค)
297- </ span >
298- ) }
299- </ Typography >
300- </ Box >
301-
302- < Stack spacing = { 2 } sx = { { width : '100%' } } >
303- < Button
304- variant = "contained"
305- onClick = { ( ) => handleMockLogin ( 'user' ) }
306- fullWidth
307- sx = { {
308- py : 1.5 ,
309- fontWeight : 700 ,
310- background : tokens . gradients . primary ,
311- boxShadow : tokens . shadows . sm ,
312- '&:hover' : {
313- boxShadow : tokens . shadows . md ,
314- transform : 'translateY(-1px)' ,
315- } ,
316- } }
317- >
318- ์ผ๋ฐ ์ฌ์ฉ์๋ก ์ฒดํ
319- </ Button >
320- < Button
321- variant = "outlined"
322- onClick = { ( ) => handleMockLogin ( 'admin' ) }
323- fullWidth
324- sx = { {
325- py : 1.5 ,
326- fontWeight : 700 ,
327- borderWidth : 2 ,
328- borderColor : tokens . colors . primary [ 400 ] ,
329- color : tokens . colors . primary [ 700 ] ,
330- '&:hover' : {
331- borderWidth : 2 ,
332- borderColor : tokens . colors . primary [ 600 ] ,
333- backgroundColor : tokens . colors . primary [ 50 ] ,
334- transform : 'translateY(-1px)' ,
335- } ,
336- } }
337- >
338- ๊ด๋ฆฌ์๋ก ์ฒดํ
339- </ Button >
340- </ Stack >
341- </ Stack >
342- </ Paper >
343-
344- < Stack
345- direction = { { xs : 'column' , sm : 'row' } }
346- spacing = { 2 }
347- sx = { { width : { xs : '100%' , sm : 'auto' } } }
348- >
349- < Button
350- variant = "outlined"
351- onClick = { ( ) => goSignup ( ) }
352- sx = { {
353- borderColor : tokens . colors . neutral [ 400 ] ,
354- color : tokens . colors . neutral [ 700 ] ,
355- fontWeight : 600 ,
356- '&:hover' : {
357- borderColor : tokens . colors . neutral [ 600 ] ,
358- backgroundColor : tokens . colors . neutral [ 50 ] ,
359- } ,
360- } }
361- >
362- ํ์๊ฐ์
363- </ Button >
364- < Button
365- variant = "outlined"
366- onClick = { ( ) => goLogin ( ) }
367- sx = { {
368- borderColor : tokens . colors . neutral [ 400 ] ,
369- color : tokens . colors . neutral [ 700 ] ,
370- fontWeight : 600 ,
371- '&:hover' : {
372- borderColor : tokens . colors . neutral [ 600 ] ,
373- backgroundColor : tokens . colors . neutral [ 50 ] ,
374- } ,
375- } }
376- >
377- ๋ก๊ทธ์ธ
378- </ Button >
379- </ Stack >
380- </ Stack >
238+ < Paper
239+ sx = { {
240+ p : 4 ,
241+ maxWidth : 420 ,
242+ mx : 'auto' ,
243+ background : 'rgba(255, 255, 255, 0.95)' ,
244+ backdropFilter : 'blur(10px)' ,
245+ boxShadow : tokens . shadows . lg ,
246+ border : `1px solid ${ tokens . colors . neutral [ 200 ] } ` ,
247+ borderRadius : tokens . borderRadius . xl ,
248+ } }
249+ > </ Paper >
381250 ) }
382251 </ Container >
383252 </ Box >
0 commit comments