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 DesignElementsContainer from '@/components/dashboard/DesignElementsContainer';
|
|
|
|
import AccountOverviewContainer from '@/components/dashboard/AccountOverviewContainer';
|
|
|
|
import NavigationBar from '@/components/NavigationBar';
|
|
|
|
import DashboardContainer from '@/components/dashboard/DashboardContainer';
|
2019-06-29 05:17:29 +00:00
|
|
|
import TransitionRouter from '@/TransitionRouter';
|
2020-03-23 01:15:38 +00:00
|
|
|
import AccountApiContainer from '@/components/dashboard/AccountApiContainer';
|
2019-06-26 04:28:56 +00:00
|
|
|
|
2019-06-29 05:17:29 +00:00
|
|
|
export default ({ location }: RouteComponentProps) => (
|
2019-06-29 05:49:08 +00:00
|
|
|
<React.Fragment>
|
2019-06-26 04:28:56 +00:00
|
|
|
<NavigationBar/>
|
2020-03-23 01:15:38 +00:00
|
|
|
{location.pathname.startsWith('/account') &&
|
|
|
|
<div id={'sub-navigation'}>
|
|
|
|
<div className={'items'}>
|
|
|
|
<NavLink to={`/account`} exact>Settings</NavLink>
|
|
|
|
<NavLink to={`/account/api`}>API Credentials</NavLink>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
}
|
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/>
|
2019-12-23 05:18:29 +00:00
|
|
|
<Route path={'/design'} component={DesignElementsContainer}/>
|
|
|
|
</Switch>
|
2019-06-29 05:17:29 +00:00
|
|
|
</TransitionRouter>
|
2019-06-29 05:49:08 +00:00
|
|
|
</React.Fragment>
|
2019-06-26 04:28:56 +00:00
|
|
|
);
|