From 5dc67062edbc65aa0b33d517725c86b6e74269c8 Mon Sep 17 00:00:00 2001 From: Noam Gaash Date: Tue, 24 Sep 2024 07:53:57 +0300 Subject: [PATCH] perf(map): set default time to pi day --- 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..9478baa4 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,