Next.js template
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 556B

123456789101112131415161718192021
  1. import { getSession } from 'next-auth/react';
  2. import { useRouter } from 'next/router';
  3. import { useEffect } from 'react';
  4. import ForgotPasswordForm from '../../../components/forms/forgot-password/ForgotPasswordForm';
  5. import { BASE_PAGE } from '../../../constants/pages';
  6. const ForgotPasswordPage = () => {
  7. const router = useRouter();
  8. useEffect(() => {
  9. getSession().then((session) => {
  10. if (session) {
  11. router.replace(BASE_PAGE);
  12. }
  13. });
  14. }, [router]);
  15. return <ForgotPasswordForm />;
  16. };
  17. export default ForgotPasswordPage;