Skip to content

Commit 9150e44

Browse files
committed
perf: improve cache by using midday for velocity things
1 parent e1a1e12 commit 9150e44

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)