Skip to content

Commit 005a883

Browse files
authored
perf: improve cache by using midday for velocity things (#1415)
1 parent bf4a4a6 commit 005a883

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/pages/velocityHeatmap/useVelocityAggregationData.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export function useVelocityAggregationData(
1717
timestamp: dayjs.Dayjs,
1818
zoom: number,
1919
) {
20+
timestamp = timestamp.startOf('day').add(12, 'hour') // use midday to avoid timezone issues
2021
const { data, isLoading, error } = useQuery({
2122
queryFn: queryFn.bind(null, bounds, timestamp, zoom),
2223
queryKey: [

0 commit comments

Comments
 (0)