import Main from './components/Main.jsx'; import React from "react"; import { useRoutes, Outlet, BrowserRouter } from 'react-router-dom'; function Router(props) { return useRoutes(props.rootRoute); } function App() { const routes = [ { index: true, element: }, { path: '/', element: , label: 'ГЛАВНОЕ' }, ]; const links = routes.filter(route => route.hasOwnProperty('label')); const rootRoute = [ { path: '/', element: render(links), children: routes } ]; function render(links) { return (