fix errors

This commit is contained in:
b1ek 2023-05-07 21:10:46 +10:00
parent cf39b342e3
commit c9781a0ced
Signed by: blek
GPG Key ID: 14546221E3595D0C
2 changed files with 11 additions and 6 deletions

View File

@ -1,6 +1,8 @@
import React from 'react'; import React from 'react';
import {Navigate, Route, Routes} from "react-router-dom"; import {Navigate, Route, Routes} from "react-router-dom";
import {privateRoutes, publicRoutes} from "../../router/index"; import routes from "../../router";
const { publicRoutes } = routes;
const AppRouter = () => { const AppRouter = () => {
return ( return (

View File

@ -7,8 +7,11 @@ import Comparisons from "../pages/Сomparisons/Сomparisons";
// {path: '/comparisons', component: Comparisons, exact: true}, // {path: '/comparisons', component: Comparisons, exact: true},
// ] // ]
export const publicRoutes = [ export default Object.freeze({
{path: '/', component: <Favorites/>, exact: true}, publicRoutes: [
{path: '/favorites', component: <Favorites/>, exact: true}, {path: '/', component: <Favorites/>, exact: true},
{path: '/comparisons', component: <Comparisons/>, exact: true}, {path: '/favorites', component: <Favorites/>, exact: true},
] {path: '/comparisons', component: <Comparisons/>, exact: true},
],
privateRoutes: []
})