Skip to content

Commit df0dc05

Browse files
committed
Merge remote-tracking branch 'benma/status2'
2 parents 0401d5d + 23e31ba commit df0dc05

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

frontends/web/src/routes/account/account.tsx

+7-5
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,15 @@ export const Account = ({
180180
return;
181181
}
182182
setStatus(status);
183-
if (!status.disabled && !status.synced) {
184-
await accountApi.init(currentCode).catch(console.error);
185-
}
186-
onAccountChanged(status);
187183
})
188184
.catch(console.error);
189-
}, [onAccountChanged, code]);
185+
}, [code]);
186+
187+
useEffect(() => {
188+
if (code !== '' && status !== undefined && !status.disabled && !status.synced) {
189+
accountApi.init(code).catch(console.error);
190+
}
191+
}, [code, status]);
190192

191193
useEffect(() => {
192194
const currentCode = code;

0 commit comments

Comments
 (0)