Skip to content

Commit

Permalink
refactor: routes object
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgeart81 committed Jul 1, 2024
1 parent 4dab79f commit 4fce3ba
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions src/reports/components/ReportsLayout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@ import PageLayout from '../../common/components/PageLayout';
import ReportsMenu from './ReportsMenu';

const routes = {
reports: {
combined: 'reportCombined',
route: 'reportRoute',
event: 'reportEvents',
trip: 'reportTrips',
stop: 'reportStops',
summary: 'reportSummary',
chart: 'reportChart',
logs: 'statisticsTitle',
scheduled: 'reportScheduled',
statistics: 'statisticsTitle',
},
combined: 'reportCombined',
route: 'reportRoute',
event: 'reportEvents',
trip: 'reportTrips',
stop: 'reportStops',
summary: 'reportSummary',
chart: 'reportChart',
logs: 'statisticsTitle',
scheduled: 'reportScheduled',
statistics: 'statisticsTitle',
};

const ReportsLayout = () => {
Expand All @@ -25,7 +23,7 @@ const ReportsLayout = () => {
return (
<PageLayout
menu={<ReportsMenu />}
breadcrumbs={['reportTitle', routes[pathSegmets[0]][pathSegmets[1]]]}
breadcrumbs={['reportTitle', routes[pathSegmets[1]]]}
>
<Outlet />
</PageLayout>
Expand Down

0 comments on commit 4fce3ba

Please sign in to comment.