function name change

Signed-off-by: npiyush97 <npiyush35@gmail.com>
This commit is contained in:
npiyush97
2024-03-17 21:55:05 +05:30
parent aa8bb0f981
commit 5f3f7b37ff
@@ -106,7 +106,7 @@ export function HeaderTabs(props: HeaderTabsProps) {
setSelectedTab(selectedIndex);
}
}, [selectedIndex]);
function clean(path: string) {
function removeLeadingSlash(path: string) {
let newPath = path;
newPath = path.replace(/^\//, '');
return newPath;
@@ -129,7 +129,7 @@ export function HeaderTabs(props: HeaderTabsProps) {
label={tab.label}
key={tab.id}
component={Link}
to={clean(tab.id)}
to={removeLeadingSlash(tab.id)}
value={index}
className={styles.defaultTab}
classes={{ selected: styles.selected, root: styles.tabRoot }}