import { Navigate, Route, Routes, useLocation, } from 'react-router-dom'; //styles import useStyles from './styles'; //pages import Start from './pages/start'; import TypographyPage from './pages/typography'; import WidgetPage from './pages/widget'; import HeaderPage from './pages/header'; import SidebarPage from './pages/sidebar'; import ButtonsPage from './pages/buttons'; //components import Header from './components/Header'; import Sidebar from '../../components/Sidebar'; import structure from './components/Sidebar/SidebarStructure'; import Widget from '../Widget'; import { Typography } from '../Wrappers'; import classnames from 'classnames'; //context import { useLayoutState } from '../../context/LayoutContext'; import { Box, Breadcrumbs, Grid } from '@mui/material'; import { NavigateNext as NavigateNextIcon } from '@mui/icons-material'; const Documentation = () => { // global let layoutState = useLayoutState(); const classes = useStyles(); const location = useLocation(); return (
{ } {structure.map((c) => { if (!c.children && location.pathname.includes(c.link) && c.link) { return ( {c.label} ); } else if (c.children) { return c.children.forEach((currentInner) => { // eslint-disable-array-callback-return if (location.pathname.includes(currentInner.link)) { return ( } aria-label='breadcrumb' key={c.id} > {c.label} {currentInner.label} ); } }); } })} } /> } /> } /> } /> } /> } /> } />
); }; export default Documentation;