@@ -4,6 +4,7 @@ import {Flex, Grid} from '@sentry/scraps/layout';
44import { Text } from '@sentry/scraps/text' ;
55
66import { Alert } from 'sentry/components/core/alert' ;
7+ import Pagination from 'sentry/components/pagination' ;
78import ReplayTable from 'sentry/components/replays/table/replayTable' ;
89import {
910 ReplayBrowserColumn ,
@@ -16,6 +17,7 @@ import {ProvidedFormattedQuery} from 'sentry/components/searchQueryBuilder/forma
1617import { t } from 'sentry/locale' ;
1718import { useReplayPlaylist } from 'sentry/utils/replays/playback/providers/replayPlaylistProvider' ;
1819import { useLocation } from 'sentry/utils/useLocation' ;
20+ import { useNavigate } from 'sentry/utils/useNavigate' ;
1921import useAllMobileProj from 'sentry/views/replays/detail/useAllMobileProj' ;
2022
2123const VISIBLE_COLUMNS = [
@@ -34,8 +36,9 @@ const MOBILE_COLUMNS = [
3436] ;
3537
3638export default function Playlist ( ) {
37- const { replays, currentReplayIndex, isLoading} = useReplayPlaylist ( ) ;
39+ const { replays, currentReplayIndex, isLoading, pageLinks } = useReplayPlaylist ( ) ;
3840 const location = useLocation ( ) ;
41+ const navigate = useNavigate ( ) ;
3942 const [ query ] = useQueryState ( 'query' , parseAsString . withDefault ( '' ) ) ;
4043
4144 const { allMobileProj} = useAllMobileProj ( { } ) ;
@@ -55,17 +58,28 @@ export default function Playlist() {
5558 < Text > { t ( 'This playlist is filtered by:' ) } </ Text >
5659 </ Alert >
5760 ) : null }
58- < ReplayTable
59- columns = { columns }
60- error = { null }
61- highlightedRowIndex = { currentReplayIndex }
62- // we prefer isLoading since isPending is true even if not enabled
63- isPending = { isLoading }
64- query = { location . query }
65- replays = { replays }
66- showDropdownFilters = { false }
67- stickyHeader
68- />
61+ < Flex direction = "column" gap = "md" >
62+ < ReplayTable
63+ columns = { columns }
64+ error = { null }
65+ highlightedRowIndex = { currentReplayIndex }
66+ // we prefer isLoading since isPending is true even if not enabled
67+ isPending = { isLoading }
68+ query = { location . query }
69+ replays = { replays }
70+ showDropdownFilters = { false }
71+ stickyHeader
72+ />
73+ < Pagination
74+ pageLinks = { pageLinks }
75+ onCursor = { ( cursor , path , searchQuery ) => {
76+ navigate ( {
77+ pathname : path ,
78+ query : { ...searchQuery , cursor} ,
79+ } ) ;
80+ } }
81+ />
82+ </ Flex >
6983 </ Grid >
7084 </ Flex >
7185 ) ;
0 commit comments