|
|
@@ -8,7 +8,7 @@ import Typography from "@mui/material/Typography"; |
|
|
|
import { TFunction } from "i18next"; |
|
|
|
import { signIn } from "next-auth/react"; |
|
|
|
import { useRouter } from "next/navigation"; |
|
|
|
import { useState } from "react"; |
|
|
|
import { useEffect, useState } from "react"; |
|
|
|
import { SubmitHandler, useForm } from "react-hook-form"; |
|
|
|
import { useTranslation } from "react-i18next"; |
|
|
|
|
|
|
@@ -32,8 +32,6 @@ const getHumanFriendlyErrorMessage = ( |
|
|
|
}; |
|
|
|
|
|
|
|
const LoginForm: React.FC = () => { |
|
|
|
// clean abilities before login |
|
|
|
window.localStorage.removeItem("abilities") |
|
|
|
const { t } = useTranslation("login"); |
|
|
|
const { |
|
|
|
register, |
|
|
@@ -61,6 +59,11 @@ const LoginForm: React.FC = () => { |
|
|
|
router.push(callbackUrl); |
|
|
|
}; |
|
|
|
|
|
|
|
useEffect(()=> { |
|
|
|
// clean abilities before login |
|
|
|
window.localStorage.removeItem("abilities") |
|
|
|
}) |
|
|
|
|
|
|
|
return ( |
|
|
|
<Stack |
|
|
|
spacing={3} |
|
|
|