mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-26 01:06:23 +02:00
feat: add loading state for chat components and implement skeleton loading UI
This commit is contained in:
parent
d0a490fa50
commit
5e4dce40bd
4 changed files with 39 additions and 3 deletions
|
|
@ -88,7 +88,7 @@ export function LayoutDataProvider({
|
|||
});
|
||||
|
||||
// Fetch threads (40 total to allow up to 20 per section - shared/private)
|
||||
const { data: threadsData } = useQuery({
|
||||
const { data: threadsData, isPending: isLoadingThreads } = useQuery({
|
||||
queryKey: ["threads", searchSpaceId, { limit: 40 }],
|
||||
queryFn: () => fetchThreads(Number(searchSpaceId), 40),
|
||||
enabled: !!searchSpaceId,
|
||||
|
|
@ -547,6 +547,7 @@ export function LayoutDataProvider({
|
|||
theme={theme}
|
||||
setTheme={setTheme}
|
||||
isChatPage={isChatPage}
|
||||
isLoadingChats={isLoadingThreads}
|
||||
inbox={{
|
||||
isOpen: isInboxSidebarOpen,
|
||||
onOpenChange: setIsInboxSidebarOpen,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue