diff --git a/app/login/page.tsx b/app/login/page.tsx index 7c77b23..e70ada3 100644 --- a/app/login/page.tsx +++ b/app/login/page.tsx @@ -1,6 +1,6 @@ 'use client'; -import { useState, useRef } from 'react'; +import { useRef, useState } from 'react'; export default function LoginPage() { const [error, setError] = useState(''); @@ -19,7 +19,7 @@ export default function LoginPage() { credentials: 'include', body: JSON.stringify({ password }), }); - if (!res.ok) throw new Error('Invalid password'); + if (!res.ok) throw new Error('bad'); window.location.href = '/'; } catch { setError('Invalid password'); @@ -58,9 +58,8 @@ export default function LoginPage() { ref={inputRef} type="password" placeholder="Password" - autoFocus autoComplete="current-password" - onKeyDown={e => e.key === 'Enter' && handleLogin()} + onKeyDown={e => { if (e.key === 'Enter') handleLogin(); }} style={{ width: '100%', background: '#faf9f6', @@ -73,6 +72,7 @@ export default function LoginPage() { marginBottom: error ? '6px' : '16px', display: 'block', boxSizing: 'border-box', + WebkitAppearance: 'none', }} /> @@ -83,7 +83,7 @@ export default function LoginPage() { )}