mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 16:23:41 +08:00 
			
		
		
		
	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:
		@@ -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
 | 
			
		||||
  }, []);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user