feat(router): add to param in send route
This commit is contained in:
parent
32816d2372
commit
c29d0b5bdd
|
@ -42,7 +42,7 @@ const ContentWrapper = styled.div`
|
|||
const getTitle = (path: string) => {
|
||||
if (path === '/') return 'Dashboard';
|
||||
|
||||
return path.replace('/', '');
|
||||
return path.split('/')[1];
|
||||
};
|
||||
|
||||
export const RouterComponent = ({
|
||||
|
@ -55,39 +55,16 @@ export const RouterComponent = ({
|
|||
<FullWrapper>
|
||||
<HeaderComponent title={getTitle(location.pathname)} />
|
||||
<ContentWrapper>
|
||||
<SidebarContainer
|
||||
location={location}
|
||||
history={history}
|
||||
/>
|
||||
{/* $FlowFixMe */}
|
||||
<SidebarContainer location={location} history={history} />
|
||||
<LayoutComponent>
|
||||
<ScrollTopComponent>
|
||||
<Switch>
|
||||
<Route
|
||||
exact
|
||||
path={DASHBOARD_ROUTE}
|
||||
component={DashboardContainer}
|
||||
/>
|
||||
<Route
|
||||
path={SEND_ROUTE}
|
||||
component={SendContainer}
|
||||
/>
|
||||
<Route
|
||||
path={RECEIVE_ROUTE}
|
||||
component={ReceiveContainer}
|
||||
/>
|
||||
<Route
|
||||
path={SETTINGS_ROUTE}
|
||||
component={SettingsContainer}
|
||||
/>
|
||||
<Route
|
||||
path={CONSOLE_ROUTE}
|
||||
component={ConsoleView}
|
||||
/>
|
||||
<Route
|
||||
path={TRANSACTIONS_ROUTE}
|
||||
component={TransactionsContainer}
|
||||
/>
|
||||
<Route exact path={DASHBOARD_ROUTE} component={DashboardContainer} />
|
||||
<Route path={`${SEND_ROUTE}/:to?`} component={SendContainer} />
|
||||
<Route path={RECEIVE_ROUTE} component={ReceiveContainer} />
|
||||
<Route path={SETTINGS_ROUTE} component={SettingsContainer} />
|
||||
<Route path={CONSOLE_ROUTE} component={ConsoleView} />
|
||||
<Route path={TRANSACTIONS_ROUTE} component={TransactionsContainer} />
|
||||
<Route component={NotFoundView} />
|
||||
</Switch>
|
||||
</ScrollTopComponent>
|
||||
|
|
Loading…
Reference in New Issue