|
@@ -1,6 +1,6 @@
|
|
|
import { lazy, Suspense } from 'react';
|
|
|
import { useSelector } from 'react-redux';
|
|
|
-import { BrowserRouter, Switch, Route } from 'react-router-dom';
|
|
|
+import { BrowserRouter, Switch } from 'react-router-dom';
|
|
|
import 'react-toastify/dist/ReactToastify.css';
|
|
|
import { ToastContainer } from 'react-toastify';
|
|
|
|
|
@@ -101,7 +101,7 @@ function App() {
|
|
|
<PrivateRoute path="/orders/:id">
|
|
|
<DetailOrder />
|
|
|
</PrivateRoute>
|
|
|
- <Route path={'/authorization'}>
|
|
|
+ <PublicRoute path={'/authorization'} restricted>
|
|
|
<Authorization />
|
|
|
<PublicRoute exact path={'/authorization/login'} restricted>
|
|
|
<SignInForm />
|
|
@@ -109,7 +109,7 @@ function App() {
|
|
|
<PublicRoute exact path={'/authorization/registration'} restricted>
|
|
|
<RegistrationForm />
|
|
|
</PublicRoute>
|
|
|
- </Route>
|
|
|
+ </PublicRoute>
|
|
|
</Switch>
|
|
|
{isLoading && <Loader />}
|
|
|
<ToastContainer
|