This commit is contained in:
Manav Rathi
2024-11-20 09:43:50 +05:30
parent 6fe4201eb8
commit 6533883eaa
2 changed files with 1 additions and 7 deletions

View File

@@ -17,12 +17,6 @@ export default [
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-call": "off",
/** TODO: Disabled as we migrate, try to prune these again */
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/array-type": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/prefer-optional-chain": "off",
"react-hooks/exhaustive-deps": "off",
"react-hooks/rules-of-hooks": "off",
"react-refresh/only-export-components": "off",

View File

@@ -57,7 +57,7 @@ const Page: React.FC<RecoverPageProps> = ({ appContext, twoFactorType }) => {
useEffect(() => {
const user = getData(LS_KEYS.USER);
const sid = user.passkeySessionID || user.twoFactorSessionID;
if (!user || !user.email || !sid) {
if (!user?.email || !sid) {
void router.push("/");
} else if (
!(user.isTwoFactorEnabled || user.isTwoFactorEnabledPasskey) &&