diff --git a/src/components/sidebar/ohri-form-sidebar.component.tsx b/src/components/sidebar/ohri-form-sidebar.component.tsx
index b25d7e91b..cacc8f883 100644
--- a/src/components/sidebar/ohri-form-sidebar.component.tsx
+++ b/src/components/sidebar/ohri-form-sidebar.component.tsx
@@ -63,30 +63,38 @@ function OHRIFormSidebar({
},
[unspecifiedFields],
);
+
+ // Check if there is only one scrollable page
+ const isSinglePage = scrollablePages.length === 1;
+
return (
- {[...scrollablePages].map((page, index) => {
- return (
- !page.isHidden && (
-
handleClick(page.label)}>
-
{page.label}
-
- )
- );
- })}
- {mode !== 'view' &&
}
+ {!isSinglePage && (
+ <>
+ {[...scrollablePages].map((page, index) => {
+ return (
+ !page.isHidden && (
+
handleClick(page.label)}>
+
{page.label}
+
+ )
+ );
+ })}
+
+ >
+ )}
{allowUnspecifiedAll && mode !== 'view' && (
@@ -99,7 +107,7 @@ function OHRIFormSidebar({
/>
)}
- {mode != 'view' && (
+ {mode !== 'view' && (
@@ -111,7 +119,7 @@ function OHRIFormSidebar({
onCancel && onCancel();
handleClose && handleClose();
}}>
- {mode == 'view' ? 'Close' : 'Cancel'}
+ {mode === 'view' ? 'Close' : 'Cancel'}