unknown 2 лет назад
Родитель
Сommit
d97dc6bbdb
2 измененных файлов с 5 добавлено и 4 удалено
  1. 1 1
      .eslintcache
  2. 4 3
      src/App.js

Разница между файлами не показана из-за своего большого размера
+ 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