Fix unnecessary reload on supply page
This commit is contained in:
parent
7e2eefad3e
commit
a15ea32f16
|
@ -11,7 +11,7 @@ export default function SupplyCard() {
|
||||||
|
|
||||||
// Fetch supply on load
|
// Fetch supply on load
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
fetchSupply();
|
if (supply === Status.Idle) fetchSupply();
|
||||||
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
||||||
|
|
||||||
if (supply === Status.Disconnected) {
|
if (supply === Status.Disconnected) {
|
||||||
|
|
|
@ -13,7 +13,7 @@ export default function TopAccountsCard() {
|
||||||
|
|
||||||
// Fetch on load
|
// Fetch on load
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
fetchRichList();
|
if (richList === Status.Idle) fetchRichList();
|
||||||
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
||||||
|
|
||||||
if (richList === Status.Disconnected) {
|
if (richList === Status.Disconnected) {
|
||||||
|
|
Loading…
Reference in New Issue