From 4f165feff5d9a6dd4e0c3ddfa8a6d1b0fb67091d Mon Sep 17 00:00:00 2001 From: Nisarg-Chokshi Date: Tue, 1 Aug 2023 14:37:33 +0530 Subject: [PATCH 1/3] Update dataset pagination rendering to remove pagination in case of no content Signed-off-by: Nisarg-Chokshi --- web/src/routes/datasets/Datasets.tsx | 44 ++++++++++++++-------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/web/src/routes/datasets/Datasets.tsx b/web/src/routes/datasets/Datasets.tsx index 1eb0200822..53d6a64830 100644 --- a/web/src/routes/datasets/Datasets.tsx +++ b/web/src/routes/datasets/Datasets.tsx @@ -136,7 +136,7 @@ class Datasets extends React.Component { {i18next.t('datasets_route.empty_body')} - + ) : ( <> @@ -227,29 +227,29 @@ class Datasets extends React.Component { })} + + + this.handleClickPage('prev')} + > + + + + + this.handleClickPage('next')} + > + + + + )} - - - this.handleClickPage('prev')} - > - - - - - this.handleClickPage('next')} - > - - - - From 6f10f5e5cdca0d7fb4281f7372a61e235169ee08 Mon Sep 17 00:00:00 2001 From: Nisarg-Chokshi Date: Tue, 1 Aug 2023 14:37:49 +0530 Subject: [PATCH 2/3] Update event pagination rendering to remove pagination in case of no content Signed-off-by: Nisarg-Chokshi --- web/src/routes/events/Events.tsx | 88 +++++++++++++++++--------------- 1 file changed, 46 insertions(+), 42 deletions(-) diff --git a/web/src/routes/events/Events.tsx b/web/src/routes/events/Events.tsx index b786da2fa2..a75fded6d0 100644 --- a/web/src/routes/events/Events.tsx +++ b/web/src/routes/events/Events.tsx @@ -186,27 +186,31 @@ class Events extends React.Component { {i18next.t('events_route.title')} Page: {this.pageNavigation()} - - - this.handleClickPage('prev')} - > - - - - - this.handleClickPage('next')} - > - - - - + {events.length === 0 ? ( + <> + ) : ( + + + this.handleClickPage('prev')} + > + + + + + this.handleClickPage('next')} + > + + + + + )} { })} + + + this.handleClickPage('prev')} + > + + + + + this.handleClickPage('next')} + > + + + + )} - - - this.handleClickPage('prev')} - > - - - - - this.handleClickPage('next')} - > - - - - From 81abe21a99ab580de91351d1fdc93c2eac5169b6 Mon Sep 17 00:00:00 2001 From: Nisarg-Chokshi Date: Tue, 1 Aug 2023 22:51:40 +0530 Subject: [PATCH 3/3] Resolved comment on the PR Signed-off-by: Nisarg-Chokshi --- web/src/routes/events/Events.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/web/src/routes/events/Events.tsx b/web/src/routes/events/Events.tsx index a75fded6d0..1677962825 100644 --- a/web/src/routes/events/Events.tsx +++ b/web/src/routes/events/Events.tsx @@ -186,9 +186,7 @@ class Events extends React.Component { {i18next.t('events_route.title')} Page: {this.pageNavigation()} - {events.length === 0 ? ( - <> - ) : ( + {events.length === 0 && (