Skip to content

Commit

Permalink
chore: Add 2-second delay before refetching USD rewards in Box4 compo…
Browse files Browse the repository at this point in the history
…nent
  • Loading branch information
deblanco committed Aug 7, 2024
1 parent 9842263 commit fd73370
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/Pages/Main/Components/Box4.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ export const Box4 = () => {
try {
const data = JSON.parse(ev.data) as { type: string };
if (data.type !== "update") return;
getUsdRewards.refetch();
setTimeout(() => {
getUsdRewards.refetch();
}, 2_000);
} catch (e) {
// do nothing
}
Expand Down

0 comments on commit fd73370

Please sign in to comment.