Disable Christmas theme and improve layout skeleton
Christmas decorations and theme logic have been disabled throughout the app, including the isDecember utility, layout, and related imports. Layout now shows a skeleton UI while mounting to prevent layout shift. Minor improvements to RevenueChart tooltip colors and ChatDetail request headers for better consistency.
This commit is contained in:
@@ -23,20 +23,39 @@ export default function Layout({ children }: LayoutProps) {
|
||||
|
||||
useEffect(() => setMounted(true), [])
|
||||
|
||||
if (!mounted) return null
|
||||
// Show skeleton while mounting to prevent layout shift
|
||||
if (!mounted) {
|
||||
return (
|
||||
<div className="flex h-screen">
|
||||
<Sidebar />
|
||||
<div className="w-full flex flex-1 flex-col">
|
||||
{!isChatDetailPage && !isAdminPage && (
|
||||
<header className="h-16 border-b border-border flex items-center justify-end px-6 bg-background">
|
||||
<div className="flex items-center space-x-2">
|
||||
<div className="h-10 w-10 bg-muted animate-pulse rounded" />
|
||||
</div>
|
||||
</header>
|
||||
)}
|
||||
<main className={`flex-1 ${isChatDetailPage ? 'p-0 overflow-hidden' : 'p-6 overflow-auto'} bg-background relative`}>
|
||||
{children}
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={`flex h-screen ${theme === "dark" ? "dark" : ""}`}>
|
||||
<div className="flex h-screen">
|
||||
<Sidebar />
|
||||
<div className="w-full flex flex-1 flex-col">
|
||||
{!isChatDetailPage && !isAdminPage && (
|
||||
<header className="h-16 border-b border-border flex items-center justify-end px-6">
|
||||
<header className="h-16 border-b border-border flex items-center justify-end px-6 bg-background">
|
||||
<div className="flex items-center space-x-2">
|
||||
<UnifiedNotifications />
|
||||
</div>
|
||||
</header>
|
||||
)}
|
||||
<main className={`flex-1 ${isChatDetailPage ? 'p-0 overflow-hidden' : 'p-6 overflow-auto'} dark:bg-[#0F0F12] relative`}>
|
||||
<main className={`flex-1 ${isChatDetailPage ? 'p-0 overflow-hidden' : 'p-6 overflow-auto'} bg-background relative`}>
|
||||
{children}
|
||||
</main>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user