2019-06-26 04:28:56 +00:00
|
|
|
import * as React from 'react';
|
2020-03-23 01:15:38 +00:00
|
|
|
import { NavLink, Route, RouteComponentProps, Switch } from 'react-router-dom';
|
2019-06-26 04:28:56 +00:00
|
|
|
import AccountOverviewContainer from '@/components/dashboard/AccountOverviewContainer';
|
|
|
|
import NavigationBar from '@/components/NavigationBar';
|
|
|
|
import DashboardContainer from '@/components/dashboard/DashboardContainer';
|
2020-03-23 01:15:38 +00:00
|
|
|
import AccountApiContainer from '@/components/dashboard/AccountApiContainer';
|
2020-04-17 18:17:01 +00:00
|
|
|
import NotFound from '@/components/screens/NotFound';
|
2020-07-04 16:46:26 +00:00
|
|
|
import TransitionRouter from '@/TransitionRouter';
|
2020-07-04 22:40:41 +00:00
|
|
|
import SubNavigation from '@/components/elements/SubNavigation';
|
2019-06-26 04:28:56 +00:00
|
|
|
|
2019-06-29 05:17:29 +00:00
|
|
|
export default ({ location }: RouteComponentProps) => (
|
2020-07-03 21:50:37 +00:00
|
|
|
<>
|
2019-06-26 04:28:56 +00:00
|
|
|
<NavigationBar/>
|
2020-03-23 01:15:38 +00:00
|
|
|
{location.pathname.startsWith('/account') &&
|
2020-07-03 22:37:26 +00:00
|
|
|
<SubNavigation>
|
|
|
|
<div>
|
2020-07-03 21:50:37 +00:00
|
|
|
<NavLink to={'/account'} exact>Settings</NavLink>
|
|
|
|
<NavLink to={'/account/api'}>API Credentials</NavLink>
|
2020-03-23 01:15:38 +00:00
|
|
|
</div>
|
2020-07-03 22:37:26 +00:00
|
|
|
</SubNavigation>
|
2020-03-23 01:15:38 +00:00
|
|
|
}
|
2019-06-29 05:17:29 +00:00
|
|
|
<TransitionRouter>
|
2019-12-23 05:18:29 +00:00
|
|
|
<Switch location={location}>
|
|
|
|
<Route path={'/'} component={DashboardContainer} exact/>
|
2020-03-23 01:15:38 +00:00
|
|
|
<Route path={'/account'} component={AccountOverviewContainer} exact/>
|
|
|
|
<Route path={'/account/api'} component={AccountApiContainer} exact/>
|
2020-04-17 18:17:01 +00:00
|
|
|
<Route path={'*'} component={NotFound}/>
|
2019-12-23 05:18:29 +00:00
|
|
|
</Switch>
|
2019-06-29 05:17:29 +00:00
|
|
|
</TransitionRouter>
|
2020-07-03 21:50:37 +00:00
|
|
|
</>
|
2019-06-26 04:28:56 +00:00
|
|
|
);
|