mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 10:23:33 +00:00
Set grid view to use local state
This commit is contained in:
parent
77bfb916ba
commit
90b503906f
3 changed files with 12 additions and 20 deletions
|
|
@ -20,7 +20,6 @@ import { useQueryClient } from '@tanstack/react-query';
|
|||
import {
|
||||
useCurrentServer,
|
||||
useAlbumListStore,
|
||||
useAlbumListItemData,
|
||||
useListStoreActions,
|
||||
useAlbumListFilter,
|
||||
} from '/@/renderer/store';
|
||||
|
|
@ -53,9 +52,6 @@ export const AlbumListContent = ({ itemCount, gridRef, tableRef }: AlbumListCont
|
|||
const navigate = useNavigate();
|
||||
const server = useCurrentServer();
|
||||
const handlePlayQueueAdd = usePlayQueueAdd();
|
||||
|
||||
const { itemData, setItemData } = useAlbumListItemData();
|
||||
|
||||
const { id, pageKey } = useAlbumListContext();
|
||||
const filter = useAlbumListFilter({ id, key: pageKey });
|
||||
const { setTable, setTablePagination, setGrid } = useListStoreActions();
|
||||
|
|
@ -316,7 +312,6 @@ export const AlbumListContent = ({ itemCount, gridRef, tableRef }: AlbumListCont
|
|||
height={height}
|
||||
initialScrollOffset={grid?.scrollOffset || 0}
|
||||
itemCount={itemCount || 0}
|
||||
itemData={itemData}
|
||||
itemGap={20}
|
||||
itemSize={grid?.itemsPerRow || 5}
|
||||
itemType={LibraryItem.ALBUM}
|
||||
|
|
@ -326,7 +321,6 @@ export const AlbumListContent = ({ itemCount, gridRef, tableRef }: AlbumListCont
|
|||
route: AppRoute.LIBRARY_ALBUMS_DETAIL,
|
||||
slugs: [{ idProperty: 'id', slugProperty: 'albumId' }],
|
||||
}}
|
||||
setItemData={setItemData}
|
||||
width={width}
|
||||
onScroll={handleGridScroll}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue