From d76e744eabe181bf9ce04effb48547427f63c7bb Mon Sep 17 00:00:00 2001 From: H0llyW00dzZ Date: Mon, 27 Nov 2023 05:44:26 +0700 Subject: [PATCH] Fix & Refactor UI/UX Page [Auth] - [+] fix(auth.tsx): fix condition to set custom endpoint to true if it's app - [+] refactor(auth.tsx): update accessStore to set useCustomConfig to true --- 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 7962d46bee4..c1e5c52afdb 100644 --- a/app/components/auth.tsx +++ b/app/components/auth.tsx @@ -24,8 +24,12 @@ export function AuthPage() { }; // Reset access code to empty string useEffect(() => { - if (getClientConfig()?.isApp) { + const clientConfig = getClientConfig(); + if (clientConfig?.isApp) { // Force to set custom endpoint to true if it's app navigate(Path.Settings); + accessStore.update((state) => { + state.useCustomConfig = true; + }); } // eslint-disable-next-line react-hooks/exhaustive-deps }, []);