Browse Source

add some changes

unknown 2 years ago
parent
commit
d97dc6bbdb
2 changed files with 5 additions and 4 deletions
  1. 1 1
      .eslintcache
  2. 4 3
      src/App.js

File diff suppressed because it is too large
+ 1 - 1
.eslintcache


+ 4 - 3
src/App.js

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