- 로그인 요청 후 응답을 AuthData 로 저장 로직 구현 - Access/Refresh 토큰 구현 중
This commit is contained in:
@@ -3,7 +3,7 @@ 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 { PageRouting } from './const/PageRouting';
|
||||
import LoginPage from './ui/page/login/LoginPage';
|
||||
import ResetPasswordPage from './ui/page/resetPassword/ResetPasswordPage';
|
||||
|
||||
@@ -17,7 +17,7 @@ function App() {
|
||||
<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}
|
||||
{!authData ? <Route element={<Navigate to={PageRouting["LOGIN"].path} />} path="*" /> : null}
|
||||
</Route>
|
||||
</Routes>
|
||||
</Router>
|
||||
|
||||
Reference in New Issue
Block a user