Fix router to make it easier to actually navigate around the app
This commit is contained in:
parent
f34593e777
commit
60f32f055e
9 changed files with 42 additions and 34 deletions
|
@ -1,11 +1,10 @@
|
|||
import * as React from 'react';
|
||||
import { Route } from 'react-router-dom';
|
||||
import { Route, RouteComponentProps } from 'react-router-dom';
|
||||
import DesignElements from '@/components/account/DesignElements';
|
||||
import TransitionRouter from '@/TransitionRouter';
|
||||
|
||||
export default () => (
|
||||
<TransitionRouter basename={'/account'}>
|
||||
<Route path={'/'} component={DesignElements} exact/>
|
||||
<Route path={'/design'} component={DesignElements} exact/>
|
||||
</TransitionRouter>
|
||||
export default ({ match }: RouteComponentProps) => (
|
||||
<div>
|
||||
<Route path={`${match.path}/`} component={DesignElements} exact/>
|
||||
<Route path={`${match.path}/design`} component={DesignElements} exact/>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -1,19 +1,16 @@
|
|||
import React from 'react';
|
||||
import { Route } from 'react-router-dom';
|
||||
import { Route, RouteComponentProps } from 'react-router-dom';
|
||||
import LoginContainer from '@/components/auth/LoginContainer';
|
||||
import ForgotPasswordContainer from '@/components/auth/ForgotPasswordContainer';
|
||||
import ResetPasswordContainer from '@/components/auth/ResetPasswordContainer';
|
||||
import TransitionRouter from '@/TransitionRouter';
|
||||
import LoginCheckpointContainer from '@/components/auth/LoginCheckpointContainer';
|
||||
|
||||
export default () => (
|
||||
<TransitionRouter basename={'/auth'}>
|
||||
<div className={'mt-32'}>
|
||||
<Route path={'/login'} component={LoginContainer} exact/>
|
||||
<Route path={'/login/checkpoint'} component={LoginCheckpointContainer}/>
|
||||
<Route path={'/password'} component={ForgotPasswordContainer} exact/>
|
||||
<Route path={'/password/reset/:token'} component={ResetPasswordContainer}/>
|
||||
<Route path={'/checkpoint'}/>
|
||||
</div>
|
||||
</TransitionRouter>
|
||||
export default ({ match }: RouteComponentProps) => (
|
||||
<div className={'mt-32'}>
|
||||
<Route path={`${match.path}/login`} component={LoginContainer} exact/>
|
||||
<Route path={`${match.path}/login/checkpoint`} component={LoginCheckpointContainer}/>
|
||||
<Route path={`${match.path}/password`} component={ForgotPasswordContainer} exact/>
|
||||
<Route path={`${match.path}/password/reset/:token`} component={ResetPasswordContainer}/>
|
||||
<Route path={`${match.path}/checkpoint`}/>
|
||||
</div>
|
||||
);
|
||||
|
|
Reference in a new issue