@@ -12,7 +12,7 @@ import DropdownButton from 'app/components/dropdownButton';
1212import DropdownControl , { DropdownItem } from 'app/components/dropdownControl' ;
1313import GroupList from 'app/components/issues/groupList' ;
1414import { getParams } from 'app/components/organizations/globalSelectionHeader/getParams' ;
15- import { Panel } from 'app/components/panels ' ;
15+ import Pagination from 'app/components/pagination ' ;
1616import { DEFAULT_RELATIVE_PERIODS } from 'app/constants' ;
1717import { URL_PARAM } from 'app/constants/globalSelectionHeader' ;
1818import { t , tct } from 'app/locale' ;
@@ -47,6 +47,8 @@ type Props = {
4747
4848type State = {
4949 issuesType : IssuesType ;
50+ pageLinks ?: string ;
51+ onCursor ?: ( ) => void ;
5052} ;
5153
5254class Issues extends React . Component < Props , State > {
@@ -143,6 +145,10 @@ class Issues extends React.Component<Props, State> {
143145 this . setState ( { issuesType} ) ;
144146 } ;
145147
148+ handleFetchSuccess = ( groupListState , onCursor ) => {
149+ this . setState ( { pageLinks : groupListState . pageLinks , onCursor} ) ;
150+ } ;
151+
146152 renderEmptyMessage = ( ) => {
147153 const { selection} = this . props ;
148154 const { issuesType} = this . state ;
@@ -174,7 +180,7 @@ class Issues extends React.Component<Props, State> {
174180 } ;
175181
176182 render ( ) {
177- const { issuesType} = this . state ;
183+ const { issuesType, pageLinks , onCursor } = this . state ;
178184 const { orgId} = this . props ;
179185 const { path, queryParams} = this . getIssuesEndpoint ( ) ;
180186 const issuesTypes = [
@@ -228,6 +234,7 @@ class Issues extends React.Component<Props, State> {
228234 </ DiscoverButton >
229235 </ GuideAnchor >
230236 </ Feature >
237+ < StyledPagination pageLinks = { pageLinks } onCursor = { onCursor } />
231238 </ OpenInButtonBar >
232239 </ ControlsWrapper >
233240 < TableWrapper data-test-id = "release-wrapper" >
@@ -239,6 +246,8 @@ class Issues extends React.Component<Props, State> {
239246 canSelectGroups = { false }
240247 withChart = { false }
241248 renderEmptyMessage = { this . renderEmptyMessage }
249+ withPagination = { false }
250+ onFetchSuccess = { this . handleFetchSuccess }
242251 />
243252 </ TableWrapper >
244253 </ React . Fragment >
@@ -272,10 +281,10 @@ const StyledDropdownItem = styled(DropdownItem)`
272281
273282const TableWrapper = styled ( 'div' ) `
274283 margin-bottom: ${ space ( 4 ) } ;
275- ${ Panel } {
276- /* smaller space between table and pagination */
277- margin-bottom: - ${ space ( 1 ) } ;
278- }
284+ ` ;
285+
286+ const StyledPagination = styled ( Pagination ) `
287+ margin: 0;
279288` ;
280289
281290export default Issues ;
0 commit comments