Skip to content

Commit 2e8abcb

Browse files
committed
Saving
1 parent 5076845 commit 2e8abcb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/web/src/app/login/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ export default function LoginPage() {
1919
const [lastSignInMethod, setLastSignInMethod] = useState<SignInMethod | null>(null);
2020

2121
useEffect(() => {
22-
const lastSignInMethod = localStorage.getItem(LAST_SIGN_IN_METHOD_KEY) as SignInMethod | null;
22+
const lastSignInMethod = localStorage?.getItem(LAST_SIGN_IN_METHOD_KEY) as SignInMethod | null;
2323
if (lastSignInMethod) {
2424
setLastSignInMethod(lastSignInMethod);
2525
}
2626
}, []);
2727

2828
const handleLogin = (method: SignInMethod) => {
2929
login(method);
30-
localStorage.setItem(LAST_SIGN_IN_METHOD_KEY, method);
30+
localStorage?.setItem(LAST_SIGN_IN_METHOD_KEY, method);
3131
}
3232

3333
return (

0 commit comments

Comments
 (0)