Redesign library navigation in experimental layout
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { getDefaultTabIndex } from 'apps/experimental/components/tabs/tabRoutes';
|
||||
import { useLocation, useSearchParams } from 'react-router-dom';
|
||||
|
||||
import { getDefaultViewIndex } from 'apps/experimental/features/libraries/utils/path';
|
||||
|
||||
const useCurrentTab = () => {
|
||||
const location = useLocation();
|
||||
const [searchParams, setSearchParams] = useSearchParams();
|
||||
@@ -12,7 +13,7 @@ const useCurrentTab = () => {
|
||||
const activeTab: number =
|
||||
searchParamsTab !== null ?
|
||||
parseInt(searchParamsTab, 10) :
|
||||
getDefaultTabIndex(location.pathname, libraryId);
|
||||
getDefaultViewIndex(location.pathname, libraryId);
|
||||
|
||||
return {
|
||||
searchParams,
|
||||
|
||||
Reference in New Issue
Block a user