mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
34 lines
851 B
TypeScript
34 lines
851 B
TypeScript
// @ts-nocheck
|
|
import React, { Suspense } from 'react';
|
|
import { Route, Switch } from 'react-router-dom';
|
|
import { getPreferenceRoutes } from '@/routes/preferences';
|
|
import { Spinner } from '@blueprintjs/core';
|
|
import { Box } from '../Layout';
|
|
|
|
export default function DashboardContentRoute() {
|
|
const preferencesRoutes = getPreferenceRoutes();
|
|
|
|
return (
|
|
<Route pathname="/preferences">
|
|
<Suspense
|
|
fallback={
|
|
<Box style={{ padding: 20 }}>
|
|
<Spinner size={20} />
|
|
</Box>
|
|
}
|
|
>
|
|
<Switch>
|
|
{preferencesRoutes.map((route, index) => (
|
|
<Route
|
|
key={index}
|
|
path={`${route.path}`}
|
|
exact={route.exact}
|
|
component={route.component}
|
|
/>
|
|
))}
|
|
</Switch>
|
|
</Suspense>
|
|
</Route>
|
|
);
|
|
}
|