From 07fa34d831059892dac6ff50e7943846df94672d Mon Sep 17 00:00:00 2001 From: g Date: Sat, 27 Dec 2025 21:12:43 +0000 Subject: [PATCH] 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. --- app/_document.tsx | 1 + app/layout.tsx | 11 ++++++----- components/analytics/RevenueChart.tsx | 6 +++--- components/dashboard/ChatDetail.tsx | 2 +- components/layout/layout.tsx | 27 +++++++++++++++++++++++---- lib/utils/christmas.ts | 7 +++++-- 6 files changed, 39 insertions(+), 15 deletions(-) diff --git a/app/_document.tsx b/app/_document.tsx index 5a63c82..92561f9 100644 --- a/app/_document.tsx +++ b/app/_document.tsx @@ -4,6 +4,7 @@ export default function Document() { return ( + diff --git a/app/layout.tsx b/app/layout.tsx index 6815872..3d724f1 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -6,8 +6,9 @@ import type React from "react" import { NotificationProvider } from "@/lib/notification-context" import { Metadata, Viewport } from "next" import KeepOnlineWrapper from "@/components/layout/KeepOnlineWrapper" -import { ChristmasDecorations } from "@/components/christmas-decorations" -import { isDecember } from "@/lib/utils/christmas" +// Christmas theme disabled +// import { ChristmasDecorations } from "@/components/christmas-decorations" +// import { isDecember } from "@/lib/utils/christmas" import { AudioPreloader } from "@/components/audio-preloader" const inter = Inter({ subsets: ["latin"] }) @@ -72,15 +73,15 @@ export default function RootLayout({ }: { children: React.ReactNode }) { - const isDec = isDecember() + const isDec = false // Christmas theme disabled return ( - + - {isDec && } + {/* Christmas decorations disabled */} -

{data.formattedDate}

-

+

+

{data.formattedDate}

+

Revenue: {hideNumbers ? '£***' : formatGBP(data.revenue)}

diff --git a/components/dashboard/ChatDetail.tsx b/components/dashboard/ChatDetail.tsx index 509548f..c31df24 100644 --- a/components/dashboard/ChatDetail.tsx +++ b/components/dashboard/ChatDetail.tsx @@ -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' } }); } diff --git a/components/layout/layout.tsx b/components/layout/layout.tsx index 7daf193..6a6e9b5 100644 --- a/components/layout/layout.tsx +++ b/components/layout/layout.tsx @@ -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 ( +

+ +
+ {!isChatDetailPage && !isAdminPage && ( +
+
+
+
+
+ )} +
+ {children} +
+
+
+ ) + } return ( -
+
{!isChatDetailPage && !isAdminPage && ( -
+
)} -
+
{children}
diff --git a/lib/utils/christmas.ts b/lib/utils/christmas.ts index 92cf576..42f92ee 100644 --- a/lib/utils/christmas.ts +++ b/lib/utils/christmas.ts @@ -1,9 +1,12 @@ /** * Check if the current date is in December * @returns true if current month is December (0-indexed, so 11 = December) + * DISABLED: Christmas theme is currently disabled */ export function isDecember(): boolean { - const now = new Date(); - return now.getMonth() === 11; // December is month 11 (0-indexed) + // Christmas theme disabled + return false; + // const now = new Date(); + // return now.getMonth() === 11; // December is month 11 (0-indexed) }