From 04b638aa064e346f72a6fcef295f151379c1be17 Mon Sep 17 00:00:00 2001 From: H0llyW00dzZ Date: Sun, 1 Oct 2023 00:23:19 +0700 Subject: [PATCH] Fix & Refactor UI Page [Auth Page] [+] fix(auth.tsx): fix conditional rendering of token input field [+] refactor(auth.tsx): improve code readability by using conditional rendering for token input field --- app/components/auth.tsx | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/app/components/auth.tsx b/app/components/auth.tsx index 8e2b964ab3d..b82d0e894c7 100644 --- a/app/components/auth.tsx +++ b/app/components/auth.tsx @@ -43,16 +43,20 @@ export function AuthPage() { access.updateCode(e.currentTarget.value); }} /> -
{Locale.Auth.SubTips}
- { - access.updateToken(e.currentTarget.value); - }} - /> + {!access.hideUserApiKey ? ( + <> +
{Locale.Auth.SubTips}
+ { + access.updateToken(e.currentTarget.value); + }} + /> + + ) : null}