From 46b4c8a004554f8bda4dc4fe50c3cfd77103a0b0 Mon Sep 17 00:00:00 2001 From: ahmadshaheer1 Date: Sun, 23 Jun 2024 14:43:51 +0430 Subject: [PATCH] chore: extract pagination config --- frontend/src/container/ListAlertRules/ListAlert.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/src/container/ListAlertRules/ListAlert.tsx b/frontend/src/container/ListAlertRules/ListAlert.tsx index 70039a5de9..e53a80dfdf 100644 --- a/frontend/src/container/ListAlertRules/ListAlert.tsx +++ b/frontend/src/container/ListAlertRules/ListAlert.tsx @@ -356,6 +356,10 @@ function ListAlert({ allAlertRules, refetch }: ListAlertProps): JSX.Element { }); } + const paginationConfig = { + defaultCurrent: Number(paginationParam) || 1, + hideOnSinglePage: true, + }; return ( <> @@ -387,10 +391,7 @@ function ListAlert({ allAlertRules, refetch }: ListAlertProps): JSX.Element { dataSource={data} dynamicColumns={dynamicColumns} onChange={handleChange} - pagination={{ - defaultCurrent: Number(paginationParam) || 1, - hideOnSinglePage: true, - }} + pagination={paginationConfig} facingIssueBtn={{ attributes: { screen: 'Alert list page',