We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5076845 commit 2e8abcbCopy full SHA for 2e8abcb
apps/web/src/app/login/page.tsx
@@ -19,15 +19,15 @@ export default function LoginPage() {
19
const [lastSignInMethod, setLastSignInMethod] = useState<SignInMethod | null>(null);
20
21
useEffect(() => {
22
- const lastSignInMethod = localStorage.getItem(LAST_SIGN_IN_METHOD_KEY) as SignInMethod | null;
+ const lastSignInMethod = localStorage?.getItem(LAST_SIGN_IN_METHOD_KEY) as SignInMethod | null;
23
if (lastSignInMethod) {
24
setLastSignInMethod(lastSignInMethod);
25
}
26
}, []);
27
28
const handleLogin = (method: SignInMethod) => {
29
login(method);
30
- localStorage.setItem(LAST_SIGN_IN_METHOD_KEY, method);
+ localStorage?.setItem(LAST_SIGN_IN_METHOD_KEY, method);
31
32
33
return (
0 commit comments