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
|
@ -66,7 +66,7 @@ export default () => {
|
|||
</div>
|
||||
<div className={'mt-6 text-center'}>
|
||||
<Link
|
||||
to={'/login'}
|
||||
to={'/auth/login'}
|
||||
className={'text-xs text-neutral-500 tracking-wide uppercase no-underline hover:text-neutral-700'}
|
||||
>
|
||||
Return to Login
|
||||
|
|
|
@ -15,7 +15,7 @@ export default ({ history, location: { state } }: RouteComponentProps<{}, Static
|
|||
const { clearFlashes, addFlash } = useStoreActions((actions: Actions<ApplicationState>) => actions.flashes);
|
||||
|
||||
if (!state || !state.token) {
|
||||
history.replace('/login');
|
||||
history.replace('/auth/login');
|
||||
|
||||
return null;
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ export default ({ history, location: { state } }: RouteComponentProps<{}, Static
|
|||
</div>
|
||||
<div className={'mt-6 text-center'}>
|
||||
<Link
|
||||
to={'/login'}
|
||||
to={'/auth/login'}
|
||||
className={'text-xs text-neutral-500 tracking-wide uppercase no-underline hover:text-neutral-700'}
|
||||
>
|
||||
Return to Login
|
||||
|
|
|
@ -28,7 +28,7 @@ export default ({ history }: RouteComponentProps) => {
|
|||
return;
|
||||
}
|
||||
|
||||
history.replace('/login/checkpoint', { token: response.confirmationToken });
|
||||
history.replace('/auth/login/checkpoint', { token: response.confirmationToken });
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
|
@ -82,7 +82,7 @@ export default ({ history }: RouteComponentProps) => {
|
|||
</div>
|
||||
<div className={'mt-6 text-center'}>
|
||||
<Link
|
||||
to={'/password'}
|
||||
to={'/auth/password'}
|
||||
className={'text-xs text-neutral-500 tracking-wide no-underline uppercase hover:text-neutral-600'}
|
||||
>
|
||||
Forgot password?
|
||||
|
|
|
@ -41,7 +41,7 @@ export default (props: Props) => {
|
|||
})
|
||||
.then(() => {
|
||||
addFlash({ type: 'success', message: 'Your password has been reset, please login to continue.' });
|
||||
props.history.push('/login');
|
||||
props.history.push('/auth/login');
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
|
@ -97,7 +97,7 @@ export default (props: Props) => {
|
|||
</div>
|
||||
<div className={'mt-6 text-center'}>
|
||||
<Link
|
||||
to={'/login'}
|
||||
to={'/auth/login'}
|
||||
className={'text-xs text-neutral-500 tracking-wide no-underline uppercase hover:text-neutral-600'}
|
||||
>
|
||||
Return to Login
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue