Files
zellyy-finance/src/pages/Login.tsx
hansoo 4d9effce41 fix: ESLint 오류 수정 - 사용하지 않는 변수들에 underscore prefix 추가
- AddTransactionButton.tsx: useEffect import 제거
- BudgetProgressCard.tsx: localBudgetData를 _localBudgetData로 변경
- Header.tsx: isMobile을 _isMobile로 변경
- RecentTransactionsSection.tsx: isDeleting을 _isDeleting로 변경
- TransactionCard.tsx: cn import 제거
- ExpenseForm.tsx: useState import 제거
- cacheStrategies.ts: QueryClient, Transaction import 제거
- Analytics.tsx: Separator import 제거, 미사용 변수들에 underscore prefix 추가
- Index.tsx: useMemo import 제거
- Login.tsx: setLoginError를 _setLoginError로 변경
- Register.tsx: useEffect dependency 수정 및 useCallback 추가
- Settings.tsx: toast, handleClick에 underscore prefix 추가
- authStore.ts: setError, setAppwriteInitialized에 underscore prefix 추가
- budgetStore.ts: ranges를 _ranges로 변경
- BudgetProgressCard.test.tsx: waitFor import 제거

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-12 20:49:36 +09:00

70 lines
1.9 KiB
TypeScript

import React, { useEffect } from "react";
import { Link, useNavigate } from "react-router-dom";
import { useAuth } from "@/stores";
import LoginForm from "@/components/auth/LoginForm";
import { useLogin } from "@/hooks/useLogin";
const Login = () => {
const {
email,
setEmail,
password,
setPassword,
showPassword,
setShowPassword,
isLoading,
isSettingUpTables,
loginError,
setLoginError: _setLoginError,
handleLogin,
} = useLogin();
const navigate = useNavigate();
const { user } = useAuth();
// 이미 로그인된 경우 메인 페이지로 리다이렉트
useEffect(() => {
if (user) {
navigate("/");
}
}, [user, navigate]);
return (
<div className="min-h-screen flex flex-col items-center justify-center p-6 bg-neuro-background">
<div className="w-full max-w-md">
<div className="text-center mb-8">
<h1 className="text-3xl font-bold text-neuro-income mb-2">
</h1>
<p className="text-gray-500">
</p>
</div>
<LoginForm
email={email}
setEmail={setEmail}
password={password}
setPassword={setPassword}
showPassword={showPassword}
setShowPassword={setShowPassword}
isLoading={isLoading}
isSettingUpTables={isSettingUpTables}
loginError={loginError}
handleLogin={handleLogin}
/>
<div className="text-center mb-4">
<p className="text-gray-500">
?{" "}
<Link
to="/register"
className="text-neuro-income font-medium hover:underline"
>
</Link>
</p>
</div>
</div>
</div>
);
};
export default Login;