mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-24 16:58:47 +01:00
Fix clicking on another account in account sheet not working
This commit is contained in:
parent
6fd9c106c6
commit
54e2f2a589
1 changed files with 5 additions and 2 deletions
|
@ -28,7 +28,10 @@ function AccountInfo({
|
||||||
const [info, setInfo] = useState(isString ? null : account);
|
const [info, setInfo] = useState(isString ? null : account);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!isString) return;
|
if (!isString) {
|
||||||
|
setInfo(account);
|
||||||
|
return;
|
||||||
|
}
|
||||||
setUIState('loading');
|
setUIState('loading');
|
||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
|
@ -41,7 +44,7 @@ function AccountInfo({
|
||||||
setUIState('error');
|
setUIState('error');
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
}, [isString, fetchAccount]);
|
}, [isString, account, fetchAccount]);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
acct,
|
acct,
|
||||||
|
|
Loading…
Reference in a new issue