feat: add loading state for chat components and implement skeleton loading UI

This commit is contained in:
Anish Sarkar 2026-02-04 20:13:33 +05:30
parent d0a490fa50
commit 5e4dce40bd
4 changed files with 39 additions and 3 deletions

View file

@ -73,6 +73,7 @@ interface LayoutShellProps {
className?: string;
// Inbox props
inbox?: InboxProps;
isLoadingChats?: boolean;
}
export function LayoutShell({
@ -108,6 +109,7 @@ export function LayoutShell({
children,
className,
inbox,
isLoadingChats = false,
}: LayoutShellProps) {
const isMobile = useIsMobile();
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
@ -159,6 +161,7 @@ export function LayoutShell({
pageUsage={pageUsage}
theme={theme}
setTheme={setTheme}
isLoadingChats={isLoadingChats}
/>
<main className={cn("flex-1", isChatPage ? "overflow-hidden" : "overflow-auto")}>
@ -228,6 +231,7 @@ export function LayoutShell({
theme={theme}
setTheme={setTheme}
className="hidden md:flex border-r shrink-0"
isLoadingChats={isLoadingChats}
/>
{/* Docked Inbox Sidebar - renders as flex sibling between sidebar and content */}