misc_pterodactyl-panel/resources/scripts/routers/DashboardRouter.tsx

21 lines
937 B
TypeScript
Raw Normal View History

2019-06-26 04:28:56 +00:00
import * as React from 'react';
import { Route, RouteComponentProps, Switch } from 'react-router-dom';
2019-06-26 04:28:56 +00:00
import DesignElementsContainer from '@/components/dashboard/DesignElementsContainer';
import AccountOverviewContainer from '@/components/dashboard/AccountOverviewContainer';
import NavigationBar from '@/components/NavigationBar';
import DashboardContainer from '@/components/dashboard/DashboardContainer';
import TransitionRouter from '@/TransitionRouter';
2019-06-26 04:28:56 +00:00
export default ({ location }: RouteComponentProps) => (
<React.Fragment>
2019-06-26 04:28:56 +00:00
<NavigationBar/>
<TransitionRouter>
<Switch location={location}>
<Route path={'/'} component={DashboardContainer} exact/>
<Route path={'/account'} component={AccountOverviewContainer}/>
<Route path={'/design'} component={DesignElementsContainer}/>
</Switch>
</TransitionRouter>
</React.Fragment>
2019-06-26 04:28:56 +00:00
);