Bladeren bron

bug fix

Signed-off-by: ryjiang <jiangruiyi@gmail.com>
ryjiang 10 maanden geleden
bovenliggende
commit
a3b6099422
2 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 0
      client/src/context/Auth.tsx
  2. 0 2
      client/src/pages/connect/AuthForm.tsx

+ 2 - 0
client/src/context/Auth.tsx

@@ -54,6 +54,8 @@ export const AuthProvider = (props: { children: React.ReactNode }) => {
       ATTU_AUTH_REQ,
       JSON.stringify({ ...authReq, password: '', token: '' })
     );
+    // set title
+    document.title = authReq.address ? `${authReq.address} - Attu` : 'Attu';
   }, [authReq]);
 
   // login API

+ 0 - 2
client/src/pages/connect/AuthForm.tsx

@@ -223,8 +223,6 @@ export const AuthForm = () => {
     setWithPass(withPass);
     // reset form
     resetValidation(formatForm(authReq));
-    // update title
-    document.title = 'Attu';
   }, [authReq.address, authReq.username, authReq.password]);
 
   return (