From 859f7f120c4315ab8c0922c61fa65ef1a067d9df Mon Sep 17 00:00:00 2001 From: Sunny <165110532+sunday-ma@users.noreply.github.com> Date: Thu, 8 Jan 2026 14:27:18 +0800 Subject: [PATCH] Update src/pages/LoginPage.tsx Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- src/pages/LoginPage.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/LoginPage.tsx b/src/pages/LoginPage.tsx index 4458a74..e4d1c08 100644 --- a/src/pages/LoginPage.tsx +++ b/src/pages/LoginPage.tsx @@ -81,12 +81,12 @@ export function LoginPage() { } }; - const handleSubmitKeyDown = (event: React.KeyboardEvent) => { + const handleSubmitKeyDown = useCallback((event: React.KeyboardEvent) => { if (event.key === 'Enter' && !loading) { - event.preventDefault(); - handleSubmit(); - } - } + event.preventDefault(); + handleSubmit(); + } + }, [loading, handleSubmit]); return (