forked from XiaoMo/ChatGPT-Next-Web
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:
parent
b21931c667
commit
d76e744eab
@ -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
|
||||||
}, []);
|
}, []);
|
||||||
|
Loading…
Reference in New Issue
Block a user