File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
web/src/pages/AllLists/RegistryDetails Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -23,12 +23,14 @@ const TABS = [
23
23
value : 0 ,
24
24
Icon : PaperIcon ,
25
25
path : "list/1/desc/all" ,
26
+ identifier : "list" ,
26
27
} ,
27
28
{
28
29
text : "History" ,
29
30
value : 1 ,
30
31
Icon : HistoryIcon ,
31
32
path : "history" ,
33
+ identifier : "history" ,
32
34
} ,
33
35
] ;
34
36
@@ -38,7 +40,7 @@ const Tabs: React.FC = () => {
38
40
const location = useLocation ( ) ;
39
41
const currentPathName = location . pathname . split ( "/" ) . at ( 3 ) ;
40
42
41
- const findTabIndex = ( pathName ) => TABS . findIndex ( ( { path } ) => pathName . startsWith ( path ) ) ;
43
+ const findTabIndex = ( pathName ) => TABS . findIndex ( ( { identifier } ) => pathName . startsWith ( identifier ) ) ;
42
44
const [ currentTab , setCurrentTab ] = useState ( findTabIndex ( currentPathName ) ) ;
43
45
44
46
useEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments