From fd73370f2c15f6218d1bbaae04c5d1bb638aa3ea Mon Sep 17 00:00:00 2001 From: Daniel Blanco Parla Date: Wed, 7 Aug 2024 14:34:56 +0200 Subject: [PATCH] chore: Add 2-second delay before refetching USD rewards in Box4 component --- app/src/Pages/Main/Components/Box4.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/Pages/Main/Components/Box4.tsx b/app/src/Pages/Main/Components/Box4.tsx index e6597aa..1307dfa 100644 --- a/app/src/Pages/Main/Components/Box4.tsx +++ b/app/src/Pages/Main/Components/Box4.tsx @@ -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 }