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
This commit is contained in:
H0llyW00dzZ 2023-11-27 05:44:26 +07:00
parent b21931c667
commit d76e744eab
No known key found for this signature in database
GPG Key ID: 05C7FFFC0845C930

View File

@ -24,8 +24,12 @@ export function AuthPage() {
}; // Reset access code to empty string }; // Reset access code to empty string
useEffect(() => { useEffect(() => {
if (getClientConfig()?.isApp) { const clientConfig = getClientConfig();
if (clientConfig?.isApp) { // Force to set custom endpoint to true if it's app
navigate(Path.Settings); navigate(Path.Settings);
accessStore.update((state) => {
state.useCustomConfig = true;
});
} }
// eslint-disable-next-line react-hooks/exhaustive-deps // eslint-disable-next-line react-hooks/exhaustive-deps
}, []); }, []);