Skip to content

Commit 8c5d5d7

Browse files
committed
fix(web): list-tab-not-highlighting
1 parent c30ef59 commit 8c5d5d7

File tree

1 file changed

+3
-1
lines changed
  • web/src/pages/AllLists/RegistryDetails

1 file changed

+3
-1
lines changed

web/src/pages/AllLists/RegistryDetails/Tabs.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ const TABS = [
2323
value: 0,
2424
Icon: PaperIcon,
2525
path: "list/1/desc/all",
26+
identifier: "list",
2627
},
2728
{
2829
text: "History",
2930
value: 1,
3031
Icon: HistoryIcon,
3132
path: "history",
33+
identifier: "history",
3234
},
3335
];
3436

@@ -38,7 +40,7 @@ const Tabs: React.FC = () => {
3840
const location = useLocation();
3941
const currentPathName = location.pathname.split("/").at(3);
4042

41-
const findTabIndex = (pathName) => TABS.findIndex(({ path }) => pathName.startsWith(path));
43+
const findTabIndex = (pathName) => TABS.findIndex(({ identifier }) => pathName.startsWith(identifier));
4244
const [currentTab, setCurrentTab] = useState(findTabIndex(currentPathName));
4345

4446
useEffect(() => {

0 commit comments

Comments
 (0)