import type { Metadata, Viewport } from "next"; import { GeistSans } from "geist/font/sans"; import { ThemeProvider } from "@/components/theme-provider"; import { AppShell } from "@/components/app-shell"; import { Toaster } from "@/components/ui/sonner"; import "./globals.css"; export const metadata: Metadata = { title: "cm WhatsApp Bot", description: "Self-hosted WhatsApp reminder bot", applicationName: "cm WhatsApp Bot", // PWA wiring: the manifest comes from the dynamic route at // src/app/manifest.webmanifest/route.ts, the apple-touch-icon is // emitted from public/, and `appleWebApp.capable` lets iOS treat the // page like a standalone app when added to the home screen. manifest: "/manifest.webmanifest", icons: { icon: [ { url: "/icon-192.png", sizes: "192x192", type: "image/png" }, { url: "/icon-512.png", sizes: "512x512", type: "image/png" }, ], apple: [{ url: "/apple-touch-icon.png", sizes: "180x180", type: "image/png" }], }, appleWebApp: { capable: true, title: "cm WA Bot", statusBarStyle: "default" }, }; export const viewport: Viewport = { themeColor: [ { media: "(prefers-color-scheme: light)", color: "#ffffff" }, { media: "(prefers-color-scheme: dark)", color: "#0a0a0a" }, ], }; export default function RootLayout({ children }: { children: React.ReactNode }) { return ( // `suppressHydrationWarning` here is for *attribute* differences only. // Two sources legitimately mutate /
attributes after the // document loads: // - next-themes adds the `class="light|dark"` (and the colour-scheme // style) before React hydrates, // - browser extensions inject dunder attributes like // `__gcrremoteframetoken`, password-manager flags, etc. // Children are still hydration-checked normally so real bugs surface.