From d697788d5997b024883f51b7ad93f00e5788d4b2 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste WATENBERG Date: Tue, 24 Dec 2024 15:35:21 +0100 Subject: [PATCH] Fix tabs with relative paths --- src/lib/components/tabsv2/Tabsv2.component.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/components/tabsv2/Tabsv2.component.tsx b/src/lib/components/tabsv2/Tabsv2.component.tsx index 11d0d31128..8ace5769ab 100644 --- a/src/lib/components/tabsv2/Tabsv2.component.tsx +++ b/src/lib/components/tabsv2/Tabsv2.component.tsx @@ -108,7 +108,7 @@ function Tabs({ return `${replaceUrl}${serialize(query)}`; } - return `${replaceUrl}/${path}${serialize(query)}`; + return `${path}${serialize(query)}`; }; useEffect(() => { @@ -153,7 +153,7 @@ function Tabs({ ...childRest }: TabProps = child.props; const isSelected = selectedTabIndex === index; - const realPath = `/${path.split('/').pop()}`; + const realPath = path.startsWith('/') ? `/${path.split('/').pop()}` : path; return (