refactor api controller to internalize server fetch

This commit is contained in:
jeffvli
2025-11-02 21:56:35 -08:00
parent 8dbaec3943
commit c7a473d864
79 changed files with 904 additions and 399 deletions
@@ -38,7 +38,7 @@ export const AlbumArtistListGridView = ({ gridRef, itemCount }: AlbumArtistListG
const { pageKey } = useListContext();
const { display, filter, grid } = useListStoreByKey<AlbumArtistListQuery>({ key: pageKey });
const { setGrid } = useListStoreActions();
const handleFavorite = useHandleFavorite({ gridRef, server });
const handleFavorite = useHandleFavorite({ gridRef });
const fetchInitialData = useCallback(() => {
const query: Omit<AlbumArtistListQuery, 'limit' | 'startIndex'> = {
@@ -89,7 +89,7 @@ export const AlbumArtistListGridView = ({ gridRef, itemCount }: AlbumArtistListG
queryFn: async ({ signal }) =>
api.controller.getAlbumArtistList({
apiClientProps: {
server,
serverId: server?.id || '',
signal,
},
query,