Merge pull request #466 from bugout-dev/fix-s3-multiple-fetch

fix query keys to be correct to stop refetches
pull/467/head
Andrei-Dolgolev 2021-11-25 19:34:34 +02:00 zatwierdzone przez GitHub
commit f3afe25e67
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 3 dodań i 4 usunięć

Wyświetl plik

@ -216,8 +216,7 @@ const Analytics = () => {
<SubscriptionReport <SubscriptionReport
timeRange={timeRange} timeRange={timeRange}
url={s3PresignedURLs[timeRange]} url={s3PresignedURLs[timeRange]}
id={v4()} id={dashboardId}
type={v4()}
refetchLinks={dashboardLinksCache.refetch} refetchLinks={dashboardLinksCache.refetch}
/> />
</Flex> </Flex>

Wyświetl plik

@ -12,12 +12,12 @@ timeMap[HOUR_KEY] = "hour";
timeMap[DAY_KEY] = "day"; timeMap[DAY_KEY] = "day";
timeMap[WEEK_KEY] = "week"; timeMap[WEEK_KEY] = "week";
const SubscriptionReport = ({ timeRange, url, id, type, refetchLinks }) => { const SubscriptionReport = ({ timeRange, url, id, refetchLinks }) => {
const { data, isLoading } = usePresignedURL({ const { data, isLoading } = usePresignedURL({
url: url, url: url,
isEnabled: true, isEnabled: true,
id: id, id: id,
type: type, cacheType: timeRange,
requestNewURLCallback: refetchLinks, requestNewURLCallback: refetchLinks,
}); });
const plotMinW = "250px"; const plotMinW = "250px";