Heatmaps bug fixes, update schema to match overlay, use react-zen component to match ui/ux, polish

This commit is contained in:
Francis Cao committed 2026-05-14 14:23:41 -07:00
1 parent a22274bbbc
commit cd20b3aafd
18 files changed
+1262 -628

No files matched your search

+14 -3
View File
@@ -1,12 +1,23 @@
import { useApi } from '../useApi';
export function useReplayQuery(websiteId: string, replayId: string) {
interface ReplayQueryOptions {
until?: number;
chunkIndex?: number;
eventIndex?: number;
}
export function useReplayQuery(
websiteId: string,
replayId: string,
options: ReplayQueryOptions = {},
) {
const { get, useQuery } = useApi();
const { until, chunkIndex, eventIndex } = options;
return useQuery({
queryKey: ['replay', { websiteId, replayId }],
queryKey: ['replay', { websiteId, replayId, until, chunkIndex, eventIndex }],
queryFn: () => {
return get(`/websites/${websiteId}/replays/${replayId}`);
return get(`/websites/${websiteId}/replays/${replayId}`, { until, chunkIndex, eventIndex });
},
enabled: Boolean(websiteId && replayId),
});