From 2df24a78ca16d390efee54bd69c494c5407d3e27 Mon Sep 17 00:00:00 2001 From: Francis Cao Date: Wed, 28 Jan 2026 18:05:34 -0800 Subject: [PATCH] bug fix. remove All time filter for websites with no data. --- src/components/input/WebsiteDateFilter.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/input/WebsiteDateFilter.tsx b/src/components/input/WebsiteDateFilter.tsx index a76058ec..58e596f5 100644 --- a/src/components/input/WebsiteDateFilter.tsx +++ b/src/components/input/WebsiteDateFilter.tsx @@ -31,9 +31,11 @@ export function WebsiteDateFilter({ const showCompare = allowCompare && !isAllTime; const websiteDateRange = useDateRangeQuery(websiteId); + const { startDate, endDate } = websiteDateRange; + const hasData = startDate && endDate; const handleChange = (date: string) => { - if (date === 'all') { + if (date === 'all' && hasData) { router.push( updateParams({ date: `${getDateRangeValue(websiteDateRange.startDate, websiteDateRange.endDate)}:all`, @@ -78,7 +80,7 @@ export function WebsiteDateFilter({