Fix clicking on another account in account sheet not working

This commit is contained in:
Lim Chee Aun 2023-03-11 15:14:59 +08:00
parent 6fd9c106c6
commit 54e2f2a589

View file

@ -28,7 +28,10 @@ function AccountInfo({
const [info, setInfo] = useState(isString ? null : account);
useEffect(() => {
if (!isString) return;
if (!isString) {
setInfo(account);
return;
}
setUIState('loading');
(async () => {
try {
@ -41,7 +44,7 @@ function AccountInfo({
setUIState('error');
}
})();
}, [isString, fetchAccount]);
}, [isString, account, fetchAccount]);
const {
acct,