Skip to content

Commit 691267d

Browse files
๐Ÿ”ฅ remove: mock login ๊ด€๋ จ ๋ถˆํ•„์š”ํ•œ ๋ถ€๋ถ„ ์‚ญ์ œ
1 parent 24fad9e commit 691267d

File tree

2 files changed

+14
-166
lines changed

2 files changed

+14
-166
lines changed

โ€Žsrc/pages/HomePage.tsxโ€Ž

Lines changed: 13 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,20 @@ import {
1616
Chip,
1717
} from '@mui/material';
1818
import { useNavigate } from 'react-router-dom';
19-
import { useAuthStore, mockLogin } from '../store/useAuthStore';
19+
import { useAuthStore } from '../store/useAuthStore';
2020
import { appConfig } from '../config/app';
2121
import SportsIcon from '@mui/icons-material/Sports';
2222
import PeopleIcon from '@mui/icons-material/People';
2323
import EventIcon from '@mui/icons-material/Event';
2424
import SecurityIcon from '@mui/icons-material/Security';
25-
import RocketLaunchIcon from '@mui/icons-material/RocketLaunch';
2625
import { tokens } from '../styles/theme';
27-
import { goLogin, goSignup } from '../auth/hostedUi';
2826

2927
export 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>

โ€Žsrc/pages/LoginPage.tsxโ€Ž

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
'use client';
2-
31
import type React from 'react';
42

5-
import { Typography, TextField, Button, Paper, Box, Alert, Stack } from '@mui/material';
3+
import { Typography, TextField, Button, Paper, Box, Alert } from '@mui/material';
64
import { useState } from 'react';
75
import { useNavigate } from 'react-router-dom';
8-
import { mockLogin } from '../store/useAuthStore';
96
import { goLogin } from '../auth/hostedUi';
107

118
export default function LoginPage() {
@@ -31,11 +28,6 @@ export default function LoginPage() {
3128
goLogin(); // Redirect to AWS Cognito Hosted UI for login
3229
};
3330

34-
const handleMockLogin = (userType: 'admin' | 'user') => {
35-
mockLogin(userType);
36-
navigate('/matches');
37-
};
38-
3931
return (
4032
<Box sx={{ maxWidth: 400, mx: 'auto', py: 4 }}>
4133
<Paper sx={{ p: 4 }}>
@@ -76,19 +68,6 @@ export default function LoginPage() {
7668
๊ณ„์ •์ด ์—†์œผ์‹ ๊ฐ€์š”? ํšŒ์›๊ฐ€์ž…
7769
</Button>
7870
</form>
79-
80-
<Alert severity="warning" sx={{ mb: 2 }}>
81-
๋ฐ๋ชจ์šฉ ๋กœ๊ทธ์ธ (์‹ค์ œ ์ธ์ฆ ๋ฏธ๊ตฌํ˜„)
82-
</Alert>
83-
84-
<Stack spacing={1}>
85-
<Button variant="outlined" onClick={() => handleMockLogin('user')} fullWidth>
86-
์ผ๋ฐ˜ ์‚ฌ์šฉ์ž๋กœ ๋กœ๊ทธ์ธ
87-
</Button>
88-
<Button variant="outlined" onClick={() => handleMockLogin('admin')} fullWidth>
89-
๊ด€๋ฆฌ์ž๋กœ ๋กœ๊ทธ์ธ
90-
</Button>
91-
</Stack>
9271
</Paper>
9372
</Box>
9473
);

0 commit comments

Comments
ย (0)