import { Button, Divider, Form, Input, Typography } from 'antd'; import { LockOutlined, UserOutlined } from '@ant-design/icons'; import { useNavigate } from 'react-router-dom'; import { authApi } from '@/api/auth'; import { useAuthStore } from '@/stores/auth'; import { COLOR_PRIMARY, GRAY, SHADOW } from '@/theme/tokens'; const { Title, Text } = Typography; export default function LoginPage() { const navigate = useNavigate(); const setAuth = useAuthStore((s) => s.setAuth); const onFinish = async (values: { loginId: string; password: string }) => { try { const resp = await authApi.login(values); localStorage.setItem('accessToken', resp.accessToken); if (resp.refreshToken) localStorage.setItem('refreshToken', resp.refreshToken); setAuth({ userId: resp.userId, loginId: resp.loginId, userName: resp.userName, roles: resp.roles, }); navigate('/'); } catch { // 인터셉터에서 메시지 처리 } }; return (
{/* 상단 브랜드 헤더 */}
GA
GA 정산시스템 GA Commission Management System
{/* 로그인 폼 */}
아이디} name="loginId" rules={[{ required: true, message: '아이디를 입력하세요' }]} style={{ marginBottom: 16 }} > } placeholder="아이디 입력" size="large" autoFocus style={{ height: 52, borderRadius: 12, fontSize: 15 }} /> 비밀번호} name="password" rules={[{ required: true, message: '비밀번호를 입력하세요' }]} style={{ marginBottom: 28 }} > } placeholder="비밀번호 입력" size="large" style={{ height: 52, borderRadius: 12, fontSize: 15 }} />
문의: 시스템 관리자 · 내선 1234
); }