app/src/pages/LostPassword.js (view raw)
1import React from 'react';
2import LostPasswordContainer from '../containers/LostPassword';
3import Layout from '../layouts/Centered';
4import {useTranslation} from 'react-i18next';
5import {useAuth} from 'strapi-react-context';
6import {Redirect} from 'react-router-dom';
7const LostPassword = () => {
8 const {t} = useTranslation();
9 const {token} = useAuth();
10
11 if (token) {
12 return <Redirect to="/dashboard" />;
13 }
14
15 return (
16 <Layout menuTitle={t('lost_password.title')}>
17 <LostPasswordContainer />
18 </Layout>
19 );
20};
21
22export default LostPassword;