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
@@ -39,7 +39,7 @@ export const ArtistListGridView = ({ gridRef, itemCount }: ArtistListGridViewPro
const { pageKey } = useListContext();
const { display, filter, grid } = useListStoreByKey<ArtistListQuery>({ key: pageKey });
const { setGrid } = useListStoreActions();
const handleFavorite = useHandleFavorite({ gridRef, server });
const handleFavorite = useHandleFavorite({ gridRef });
const fetchInitialData = useCallback(() => {
const query: Omit<ArtistListQuery, 'limit' | 'startIndex'> = {
@@ -90,7 +90,7 @@ export const ArtistListGridView = ({ gridRef, itemCount }: ArtistListGridViewPro
queryFn: async ({ signal }) =>
api.controller.getArtistList({
apiClientProps: {
server,
serverId: server?.id || '',
signal,
},
query,