Redesign library navigation in experimental layout

This commit is contained in:
Bill Thornton
2024-09-16 14:16:34 -04:00
parent dbb0941fef
commit c5da93c30f
26 changed files with 598 additions and 311 deletions
+3 -2
View File
@@ -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,