From 5f127e90d4dd6d7998437ab8af456b340023db99 Mon Sep 17 00:00:00 2001 From: Christopher Chiche Date: Wed, 13 Sep 2023 12:35:16 +0200 Subject: [PATCH] Disable fetch if report already exists --- reports/src/capability/useReport.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/reports/src/capability/useReport.tsx b/reports/src/capability/useReport.tsx index fe11af8..acce9cb 100644 --- a/reports/src/capability/useReport.tsx +++ b/reports/src/capability/useReport.tsx @@ -28,6 +28,7 @@ export const useReport = ({ useEffect(() => { const fetchReport = async () => { + if (_report) return; setLoading(true); try { const res = await fetch(reportUrl);