Files
scheduler-front/src/App.tsx
Hyang-Dan 877bbc582e
All checks were successful
Test CI / build (push) Successful in 15s
issue #33
- 로그인 버튼 비활성화 오류 해결
- 로그인 요칭 및 응답에 따른 토스트 구현
2025-11-30 18:20:47 +09:00

28 lines
1000 B
TypeScript

import './App.css';
import SignUpPage from './ui/page/signup/SignUpPage';
import Layout from './layouts/Layout';
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
import { useAuthStore } from './store/authStore';
import { PageRouting } from './data/RoutingData';
import LoginPage from './ui/page/login/LoginPage';
import ResetPasswordPage from './ui/page/resetPassword/ResetPasswordPage';
function App() {
const { authData } = useAuthStore();
return (
<Router>
<Routes>
<Route element={<Layout />}>
<Route element={<LoginPage />} path={PageRouting["LOGIN"].path} />
<Route element={<SignUpPage />} path={PageRouting["SIGN_UP"].path} />
<Route element={<ResetPasswordPage />} path={PageRouting["RESET_PASSWORD"].path} />
{!(authData?.isLogedIn) ? <Route element={<Navigate to={PageRouting["LOGIN"].path} />} path="*" /> : null}
</Route>
</Routes>
</Router>
);
}
export default App