From 6fba5eaaa1779f3ea5718fa439b1a416a372b339 Mon Sep 17 00:00:00 2001 From: Noam Gaash Date: Tue, 24 Sep 2024 10:04:33 +0300 Subject: [PATCH] perf(map): set default time to pi day (#885) --- src/pages/timeBasedMap/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/timeBasedMap/index.tsx b/src/pages/timeBasedMap/index.tsx index ae5dfdd4..58b5c1c5 100644 --- a/src/pages/timeBasedMap/index.tsx +++ b/src/pages/timeBasedMap/index.tsx @@ -41,8 +41,8 @@ interface Path { vehicleRef: number } -const fiveMinutesAgo = moment().subtract(5, 'minutes') -const fourMinutesAgo = moment(fiveMinutesAgo).add(1, 'minutes') +const defaultStart = moment('2023-03-14T15:00:00Z') +const defaultEnd = moment(defaultStart).add(1, 'minutes') export default function TimeBasedMapPage() { const [isExpanded, setIsExpanded] = useState(false) @@ -54,8 +54,8 @@ export default function TimeBasedMapPage() { } //TODO (another PR and another issue) load from url like in another pages. - const [from, setFrom] = useState(fiveMinutesAgo) - const [to, setTo] = useState(fourMinutesAgo) + const [from, setFrom] = useState(defaultStart) + const [to, setTo] = useState(defaultEnd) const { locations, isLoading } = useVehicleLocations({ from,