refactor search into individual sections by itemtype, add infinite loader

This commit is contained in:
jeffvli
2026-03-18 00:59:04 -07:00
parent b7cbdb4d6c
commit 615f9c3515
9 changed files with 593 additions and 211 deletions
+5
View File
@@ -347,6 +347,11 @@ export const queryKeys: Record<
list: (serverId: string) => [serverId, 'roles'] as const,
},
search: {
infiniteList: (
serverId: string,
type: 'albumArtists' | 'albums' | 'songs',
searchTerm: string,
) => [serverId, 'search', 'infiniteList', type, searchTerm] as const,
list: (serverId: string, query?: SearchQuery) => {
if (query) return [serverId, 'search', 'list', query] as const;
return [serverId, 'search', 'list'] as const;