"use client"
import { Suspense, type ReactNode, useEffect, useState } from "react"
import { AppSidebar } from "@/components/app-sidebar"
import { AuthGuard } from "@/components/auth/auth-guard"
import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar"
import { Skeleton } from "@/components/ui/skeleton"
import { GlobalQuickActions } from "@/components/global-quick-actions"
import { useAuth } from "@/lib/auth-client"
interface AppShellProps {
header: ReactNode
children: ReactNode
showQuickActions?: boolean
}
export function AppShell({ header, children, showQuickActions = true }: AppShellProps) {
const { isLoading } = useAuth()
const [hydrated, setHydrated] = useState(false)
useEffect(() => {
setHydrated(true)
}, [])
const renderSkeleton = !hydrated || isLoading
return (