Fix unnecessary reload on supply page

This commit is contained in:
Justin Starry 2020-05-23 18:56:19 +08:00 committed by Michael Vines
parent 7e2eefad3e
commit a15ea32f16
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ export default function SupplyCard() {
// Fetch supply on load
React.useEffect(() => {
fetchSupply();
if (supply === Status.Idle) fetchSupply();
}, []); // eslint-disable-line react-hooks/exhaustive-deps
if (supply === Status.Disconnected) {

View File

@ -13,7 +13,7 @@ export default function TopAccountsCard() {
// Fetch on load
React.useEffect(() => {
fetchRichList();
if (richList === Status.Idle) fetchRichList();
}, []); // eslint-disable-line react-hooks/exhaustive-deps
if (richList === Status.Disconnected) {