This commit is contained in:
@@ -8,6 +8,7 @@ import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-d
|
||||
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();
|
||||
@@ -18,6 +19,7 @@ function App() {
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user