From b5e89d444055ee92b806855499f505f8b12bfa52 Mon Sep 17 00:00:00 2001 From: B0zal Date: Tue, 12 Sep 2023 06:56:55 +0700 Subject: [PATCH] [+] Updated Auth Page - Made changes to the Auth Page to reset the input field for the access code when the "Later" button is clicked. This ensures that only expected user is logged by entering access code or entering their OpenAI API Key, mitigating the risk of small bug issue --- app/components/auth.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/components/auth.tsx b/app/components/auth.tsx index 1ca83dcd..9a5b0c65 100644 --- a/app/components/auth.tsx +++ b/app/components/auth.tsx @@ -15,6 +15,7 @@ export function AuthPage() { const access = useAccessStore(); const goHome = () => navigate(Path.Home); + const resetAccessCode = () => access.updateCode(""); // Reset access code to empty string useEffect(() => { if (getClientConfig()?.isApp) { @@ -48,7 +49,10 @@ export function AuthPage() { type="primary" onClick={goHome} /> - + { + resetAccessCode(); + goHome(); + }} /> );