add folder browsing support (#315)

This commit is contained in:
jeffvli
2025-12-02 21:30:44 -08:00
parent 355257104d
commit 917bf91583
53 changed files with 2382 additions and 299 deletions
@@ -0,0 +1,45 @@
import { useMemo, useState } from 'react';
import { ListContext } from '/@/renderer/context/list-context';
import { FolderListContent } from '/@/renderer/features/folders/components/folder-list-content';
import { FolderListHeader } from '/@/renderer/features/folders/components/folder-list-header';
import { AnimatedPage } from '/@/renderer/features/shared/components/animated-page';
import { ListWithSidebarContainer } from '/@/renderer/features/shared/components/list-with-sidebar-container';
import { PageErrorBoundary } from '/@/renderer/features/shared/components/page-error-boundary';
import { ItemListKey } from '/@/shared/types/types';
const FolderListRoute = () => {
const pageKey = ItemListKey.SONG;
const [itemCount, setItemCount] = useState<number | undefined>(undefined);
const providerValue = useMemo(() => {
return {
id: undefined,
itemCount,
pageKey,
setItemCount,
};
}, [itemCount, pageKey, setItemCount]);
return (
<AnimatedPage>
<ListContext.Provider value={providerValue}>
<FolderListHeader />
<ListWithSidebarContainer>
<FolderListContent />
</ListWithSidebarContainer>
</ListContext.Provider>
</AnimatedPage>
);
};
const FolderListRouteWithBoundary = () => {
return (
<PageErrorBoundary>
<FolderListRoute />
</PageErrorBoundary>
);
};
export default FolderListRouteWithBoundary;