2020-11-08 21:18:15 +00:00
|
|
|
import React from 'react';
|
2022-05-28 17:32:35 +00:00
|
|
|
import { Route, Switch, useRouteMatch } from 'react-router-dom';
|
2019-06-10 02:26:20 +00:00
|
|
|
import LoginContainer from '@/components/auth/LoginContainer';
|
2019-06-12 05:02:18 +00:00
|
|
|
import ForgotPasswordContainer from '@/components/auth/ForgotPasswordContainer';
|
2019-06-16 23:57:57 +00:00
|
|
|
import ResetPasswordContainer from '@/components/auth/ResetPasswordContainer';
|
2019-06-17 01:07:57 +00:00
|
|
|
import LoginCheckpointContainer from '@/components/auth/LoginCheckpointContainer';
|
2021-01-31 02:01:32 +00:00
|
|
|
import { NotFound } from '@/components/elements/ScreenBlock';
|
2022-05-28 17:32:35 +00:00
|
|
|
import { useHistory, useLocation } from 'react-router';
|
2019-06-10 02:26:20 +00:00
|
|
|
|
2022-05-28 17:32:35 +00:00
|
|
|
export default () => {
|
|
|
|
const history = useHistory();
|
|
|
|
const location = useLocation();
|
|
|
|
const { path } = useRouteMatch();
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className={'pt-8 xl:pt-32'}>
|
|
|
|
<Switch location={location}>
|
|
|
|
<Route path={`${path}/login`} component={LoginContainer} exact/>
|
|
|
|
<Route path={`${path}/login/checkpoint`} component={LoginCheckpointContainer}/>
|
|
|
|
<Route path={`${path}/password`} component={ForgotPasswordContainer} exact/>
|
|
|
|
<Route path={`${path}/password/reset/:token`} component={ResetPasswordContainer}/>
|
|
|
|
<Route path={`${path}/checkpoint`}/>
|
|
|
|
<Route path={'*'}>
|
|
|
|
<NotFound onBack={() => history.push('/auth/login')}/>
|
|
|
|
</Route>
|
|
|
|
</Switch>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|