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:
@@ -94,9 +94,9 @@ export default function RevenueChart({ timeRange, hideNumbers = false }: Revenue
|
||||
if (active && payload && payload.length) {
|
||||
const data = payload[0].payload;
|
||||
return (
|
||||
<div className="bg-white p-3 border border-gray-200 rounded-lg shadow-lg">
|
||||
<p className="text-sm font-medium text-gray-900">{data.formattedDate}</p>
|
||||
<p className="text-sm text-blue-600">
|
||||
<div className="bg-background p-3 border border-border rounded-lg shadow-lg">
|
||||
<p className="text-sm font-medium text-foreground">{data.formattedDate}</p>
|
||||
<p className="text-sm text-blue-600 dark:text-blue-400">
|
||||
Revenue: <span className="font-semibold">{hideNumbers ? '£***' : formatGBP(data.revenue)}</span>
|
||||
</p>
|
||||
<p className="text-sm text-green-600">
|
||||
|
||||
@@ -473,7 +473,7 @@ export default function ChatDetail({ chatId }: { chatId: string }) {
|
||||
content: newMessage
|
||||
}),
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
'Content-Type': 'application/json; charset=utf-8'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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