Merge pull request #1113 from SohamBhattacharjee2003/perf/optimize-threads-query

perf: normalize query keys and add placeholderData to optimize…
This commit is contained in:
Rohan Verma 2026-04-03 08:12:16 -07:00 committed by GitHub
commit 183169a37a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -109,6 +109,7 @@ export function AllPrivateChatsSidebarContent({
queryKey: ["all-threads", searchSpaceId],
queryFn: () => fetchThreads(Number(searchSpaceId)),
enabled: !!searchSpaceId && !isSearchMode,
placeholderData: () => queryClient.getQueryData(["threads", searchSpaceId, { limit: 40 }]),
});
const {