Skip to content

Commit

Permalink
redirect from signup page added for auth user
Browse files Browse the repository at this point in the history
  • Loading branch information
Lvyshnevska committed Oct 18, 2023
1 parent 8da061c commit af519ad
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions FrontEnd/src/components/basicPage/BasicPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,19 @@ function BasicPage() {
>
<Header isAuthorized={auth.isAuth} />
<Routes>
<Route path="/" element={<MainPage />} />
<Route path="/" element={<MainPage isAuthorized={auth.isAuth}/>} />
<Route path="/profile/*" element={<ProfilePage />} />
<Route path="/profiles/:filter" element={<ProfileListPage isAuthorized={auth.isAuth} />}/>
{auth.isAuth ? (
<Route path="/login" element={<Navigate to="/profile/user-info" />} />
) : (
<Route path="/login" element={<AuthorizationPage />} />
)}
<Route path="/sign-up" element={<SignUpPage />} />
{auth.isAuth ? (
<Route path="/sign-up" element={<Navigate to="/profile/user-info" />} />
) : (
<Route path="/sign-up" element={<SignUpPage />} />
)}
<Route path="/privacy-policy" element={<PrivacyPolicy />} />
<Route path="/terms-and-conditions" element={<TermsAndConditions />} />
<Route path="/cookies-policy" element={<CookiesPolicyComponent />} />
Expand Down

0 comments on commit af519ad

Please sign in to comment.