Browse Source

fix(replays): another pagination thing (#38044)

Follows https://github.com/getsentry/sentry/pull/37960
Follows https://github.com/getsentry/sentry/pull/37974

Fixes https://github.com/getsentry/sentry/pull/37931
Ryan Albrecht 2 years ago
parent
commit
0dc3d6ef95

+ 4 - 1
static/app/utils/replays/hooks/useReplayList.tsx

@@ -58,7 +58,10 @@ function useReplayList({eventView, organization}: Options): Result {
 
       const [{data: records}, _textStatus, resp] = await api.requestPromise(path, {
         includeAllArgs: true,
-        query: eventView.getEventsAPIPayload(location),
+        query: {
+          ...eventView.getEventsAPIPayload(location),
+          cursor: location.query.cursor,
+        },
       });
 
       const pageLinks = resp?.getResponseHeader('Link') ?? '';

+ 1 - 0
static/app/views/replays/types.tsx

@@ -76,6 +76,7 @@ export type ReplayRecord = {
 };
 
 export type ReplayListLocationQuery = {
+  cursor?: string;
   end?: string;
   environment?: string[];
   field?: string[];