From 398f6750e4a897d3c5599d1c6a4a309e8202b74c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20Dombya?=
<135591453+hervedombya@users.noreply.github.com>
Date: Fri, 13 Dec 2024 16:17:38 +0100
Subject: [PATCH] Wrap Tabs component with BrowserRouter for improved routing
support
---
.../components/tabsv2/Tabsv2.component.tsx | 119 +++++++++---------
1 file changed, 61 insertions(+), 58 deletions(-)
diff --git a/src/lib/components/tabsv2/Tabsv2.component.tsx b/src/lib/components/tabsv2/Tabsv2.component.tsx
index 734fe4513d..433b39804d 100644
--- a/src/lib/components/tabsv2/Tabsv2.component.tsx
+++ b/src/lib/components/tabsv2/Tabsv2.component.tsx
@@ -6,6 +6,7 @@ import React, {
useState,
} from 'react';
import {
+ BrowserRouter,
Outlet,
Route,
Routes,
@@ -186,65 +187,67 @@ function Tabs({
);
});
return (
-
-
-
- {displayScroll.start && (
-
- )}
-
-
- {tabItems}
-
-
- {displayScroll.end && (
-
- )}
-
-
- {filteredTabsChildren.map((tab, index) => {
- const path = tab.props.path.split('/').pop();
- return (
-
-
- {tab.props.children}
-
-
- >
- }
+
+
+
+
+ {displayScroll.start && (
+
+ )}
+
+
+ {tabItems}
+
+
+ {displayScroll.end && (
+
- );
- })}
-
-
-
+ )}
+
+
+ {filteredTabsChildren.map((tab, index) => {
+ const path = tab.props.path.split('/').pop();
+ return (
+
+
+ {tab.props.children}
+
+
+ >
+ }
+ />
+ );
+ })}
+
+
+
+
);
}