import React from 'react'; import { NavLink, Route, Switch } from 'react-router-dom'; import NavigationBar from '@/components/NavigationBar'; import DashboardContainer from '@/components/dashboard/DashboardContainer'; import { NotFound } from '@/components/elements/ScreenBlock'; import TransitionRouter from '@/TransitionRouter'; import SubNavigation from '@/components/elements/SubNavigation'; import { useLocation } from 'react-router'; import Spinner from '@/components/elements/Spinner'; import routes from '@/routers/routes'; export default () => { const location = useLocation(); return ( <> {location.pathname.startsWith('/account') && (
{routes.account .filter((route) => !!route.name) .map(({ path, name, exact = false }) => ( {name} ))}
)} }> {routes.account.map(({ path, component: Component }) => ( ))} ); };