From b0cb31860a0af0b4ec9ecb4ded574d5f1fb43267 Mon Sep 17 00:00:00 2001 From: Tim Pechersky Date: Tue, 16 Nov 2021 00:59:44 +0000 Subject: [PATCH] refetch --- frontend/pages/dashboard/[dashboardId].js | 1 + frontend/src/components/SubscriptionReport.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/pages/dashboard/[dashboardId].js b/frontend/pages/dashboard/[dashboardId].js index fa006bd3..56141b13 100644 --- a/frontend/pages/dashboard/[dashboardId].js +++ b/frontend/pages/dashboard/[dashboardId].js @@ -218,6 +218,7 @@ const Analytics = () => { url={s3PresignedURLs[timeRange]} id={v4()} type={v4()} + refetchLinks={dashboardLinksCache.refetch} /> ); diff --git a/frontend/src/components/SubscriptionReport.js b/frontend/src/components/SubscriptionReport.js index d90ecaa0..f3bee270 100644 --- a/frontend/src/components/SubscriptionReport.js +++ b/frontend/src/components/SubscriptionReport.js @@ -12,12 +12,13 @@ timeMap[HOUR_KEY] = "hour"; timeMap[DAY_KEY] = "day"; timeMap[WEEK_KEY] = "week"; -const SubscriptionReport = ({ timeRange, url, id, type }) => { +const SubscriptionReport = ({ timeRange, url, id, type, refetchLinks }) => { const { data, isLoading } = usePresignedURL({ url: url, isEnabled: true, id: id, type: type, + requestNewURLCallback: refetchLinks, }); const plotMinW = "500px"; if (!data || isLoading) return ;