mirror of
https://github.com/ente-io/ente.git
synced 2025-08-07 15:09:09 +00:00
Scope
This commit is contained in:
parent
cc2be30f53
commit
1c1fe7f1df
@ -71,7 +71,7 @@ export const Verify2FACodeForm: React.FC<Verify2FACodeFormProps> = ({
|
||||
|
||||
useEffect(() => {
|
||||
if (values.otp.length == 6 && !isSubmitting) void submitForm();
|
||||
}, [values, isSubmitting]);
|
||||
}, [values, isSubmitting, submitForm]);
|
||||
|
||||
return (
|
||||
<form onSubmit={handleSubmit}>
|
||||
|
@ -4,10 +4,7 @@ export default [
|
||||
...config,
|
||||
{
|
||||
rules: {
|
||||
/* TODO:
|
||||
* "This rule requires the `strictNullChecks` compiler option to be
|
||||
* turned on to function correctly"
|
||||
*/
|
||||
/* TODO: */
|
||||
"@typescript-eslint/no-unnecessary-condition": "off",
|
||||
"@typescript-eslint/no-unsafe-assignment": "off",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
@ -15,8 +12,6 @@ export default [
|
||||
"@typescript-eslint/no-unsafe-member-access": "off",
|
||||
"@typescript-eslint/no-unsafe-argument": "off",
|
||||
"@typescript-eslint/no-unsafe-call": "off",
|
||||
/** TODO: Disabled as we migrate, try to prune these again */
|
||||
"react-hooks/exhaustive-deps": "off",
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@ -27,7 +27,7 @@ const Page: React.FC = () => {
|
||||
if (!user?.token) {
|
||||
void router.push("/");
|
||||
}
|
||||
}, []);
|
||||
}, [router]);
|
||||
|
||||
return (
|
||||
<AccountsPageContents>
|
||||
|
@ -50,7 +50,7 @@ const Page: React.FC = () => {
|
||||
} else {
|
||||
setToken(user.token);
|
||||
}
|
||||
}, []);
|
||||
}, [router]);
|
||||
|
||||
const onSubmit: SetPasswordFormProps["callback"] = async (
|
||||
passphrase,
|
||||
|
@ -199,9 +199,10 @@ const Page: React.FC = () => {
|
||||
}
|
||||
};
|
||||
void main();
|
||||
// TODO: validateSession is a dependency, but add that only after we've
|
||||
// wrapped items from the callback (like logout) in useCallback too.
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
// TODO: ^ validateSession is a dependency, but add that only after we've
|
||||
// wrapped items from the callback (like logout) in useCallback too.
|
||||
|
||||
const getKeyAttributes: VerifyMasterPasswordFormProps["getKeyAttributes"] =
|
||||
async (kek: string) => {
|
||||
|
@ -65,7 +65,7 @@ const Page: React.FC = () => {
|
||||
setToken(user.token);
|
||||
setLoading(false);
|
||||
}
|
||||
}, []);
|
||||
}, [router]);
|
||||
|
||||
const onSubmit: SetPasswordFormProps["callback"] = async (
|
||||
passphrase,
|
||||
|
@ -20,7 +20,7 @@ const Page: React.FC = () => {
|
||||
void router.push(PAGES.VERIFY);
|
||||
}
|
||||
setLoading(false);
|
||||
}, []);
|
||||
}, [router]);
|
||||
|
||||
const onSignUp = () => void router.push(PAGES.SIGNUP);
|
||||
|
||||
|
@ -33,7 +33,7 @@ const Page: React.FC = () => {
|
||||
void saveCredentialsAndNavigateTo(passkeySessionID, response).then(
|
||||
(slug: string) => router.push(slug),
|
||||
);
|
||||
}, []);
|
||||
}, [router]);
|
||||
|
||||
return <LoadingIndicator />;
|
||||
};
|
||||
|
@ -59,7 +59,7 @@ const Page: React.FC = () => {
|
||||
} else {
|
||||
setKeyAttributes(keyAttributes);
|
||||
}
|
||||
}, []);
|
||||
}, [router]);
|
||||
|
||||
const recover: SingleInputFormProps["callback"] = async (
|
||||
recoveryKey: string,
|
||||
|
@ -20,7 +20,7 @@ const Page: React.FC = () => {
|
||||
void router.push(PAGES.VERIFY);
|
||||
}
|
||||
setLoading(false);
|
||||
}, []);
|
||||
}, [router]);
|
||||
|
||||
const onLogin = () => void router.push(PAGES.LOGIN);
|
||||
|
||||
|
@ -92,6 +92,8 @@ const Page: React.FC<RecoverPageProps> = ({ twoFactorType }) => {
|
||||
}
|
||||
};
|
||||
void main();
|
||||
// TODO:
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
const recover: SingleInputFormProps["callback"] = async (
|
||||
|
@ -40,7 +40,7 @@ const Page: React.FC = () => {
|
||||
} else {
|
||||
setSessionID(user.twoFactorSessionID);
|
||||
}
|
||||
}, []);
|
||||
}, [router]);
|
||||
|
||||
const handleSubmit = async (otp: string) => {
|
||||
try {
|
||||
|
@ -74,7 +74,7 @@ const Page: React.FC = () => {
|
||||
}
|
||||
};
|
||||
void main();
|
||||
}, []);
|
||||
}, [router]);
|
||||
|
||||
const onSubmit: SingleInputFormProps["callback"] = async (
|
||||
ott,
|
||||
|
Loading…
x
Reference in New Issue
Block a user