Signed-off-by: ryjiang <jiangruiyi@gmail.com>
@@ -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
@@ -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 (