From 1304514c26f388c75472ca6fc34f49b13fc13b6b Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Tue, 5 Nov 2024 20:47:35 -0800 Subject: [PATCH] clarity updates --- web/src/components/search/filtering/Filters.tsx | 3 +-- web/src/lib/dateUtils.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/web/src/components/search/filtering/Filters.tsx b/web/src/components/search/filtering/Filters.tsx index a25810741f9..3592c054dc3 100644 --- a/web/src/components/search/filtering/Filters.tsx +++ b/web/src/components/search/filtering/Filters.tsx @@ -116,7 +116,7 @@ export function SourceSelector({
Time Range

- {getTimeAgoString(timeRange?.from!)} + {getTimeAgoString(timeRange?.from!) || "Select a time range"}

@@ -463,7 +463,6 @@ export function HorizontalSourceSelector({ border-border rounded-lg bg-background - flex max-h-96 overflow-y-scroll overscroll-contain diff --git a/web/src/lib/dateUtils.ts b/web/src/lib/dateUtils.ts index ed8c960232d..aea571e9dc1 100644 --- a/web/src/lib/dateUtils.ts +++ b/web/src/lib/dateUtils.ts @@ -57,7 +57,7 @@ export const buildDateString = (date: Date | null) => { : "Select a time range"; }; export const getTimeAgoString = (date: Date | null) => { - if (!date) return "Since"; + if (!date) return null; const diffMs = new Date().getTime() - date.getTime(); const diffDays = Math.floor(diffMs / (1000 * 60 * 60 * 24));