import { useState, FormEvent } from 'react'; interface Props { onLogin: () => void; } const PASSWORD = 'GoogleyBear2020!'; export default function LoginScreen({ onLogin }: Props) { const [input, setInput] = useState(''); const [error, setError] = useState(false); const [shake, setShake] = useState(false); const handleSubmit = (e: FormEvent) => { e.preventDefault(); if (input === PASSWORD) { sessionStorage.setItem('kira-auth', '1'); onLogin(); } else { setError(true); setShake(true); setTimeout(() => setShake(false), 500); setTimeout(() => setError(false), 2000); } }; return (
enter the magic word ✨