Files
cannamanage/cannamanage-frontend/src/app/layout.tsx
T
Patrick Plate 599514c0db
Deploy to Production / test (push) Has been cancelled
Deploy to Production / deploy (push) Has been cancelled
feat(sprint-6): Phase 6 — Notifications (WebSocket) + PWA
- WebSocket: Spring STOMP + SockJS, NotificationService, persistent notifications table
- NotificationController: GET/PUT endpoints for notification management
- Frontend: notification bell with unread badge, dropdown panel, real-time via STOMP
- PWA: manifest.json, service worker (manual sw.js), offline page, install prompt
- PWA icons (192+512), dark theme colors, standalone display
- Full i18n (de/en) for notifications and PWA
- Flyway V10 migration for notifications table
- spring-boot-starter-websocket dependency added
2026-06-12 23:02:44 +02:00

74 lines
2.2 KiB
TypeScript

import { Cairo, Lato } from "next/font/google"
import { cn } from "@/lib/utils"
import "./globals.css"
import { Providers } from "@/providers"
import type { Metadata } from "next"
import type { ReactNode } from "react"
import { Toaster as Sonner } from "@/components/ui/sonner"
import { Toaster } from "@/components/ui/toaster"
import { PwaInstallPrompt } from "@/components/pwa-install-prompt"
import { ServiceWorkerRegistration as SwRegistration } from "@/components/sw-registration"
// Define metadata for the application
// More info: https://nextjs.org/docs/app/building-your-application/optimizing/metadata
export const metadata: Metadata = {
title: {
template: "%s | CannaManage",
default: "CannaManage",
},
description: "Cannabis club management platform — CannaManage",
metadataBase: new URL(process.env.BASE_URL as string),
manifest: "/manifest.json",
themeColor: "#2ECC71",
appleWebApp: {
capable: true,
statusBarStyle: "default",
title: "CannaManage",
},
}
// Define fonts for the application
// More info: https://nextjs.org/docs/app/building-your-application/optimizing/fonts
const latoFont = Lato({
subsets: ["latin"],
weight: ["100", "300", "400", "700", "900"],
style: ["normal", "italic"],
variable: "--font-lato",
})
const cairoFont = Cairo({
subsets: ["arabic"],
weight: ["400", "700"],
style: ["normal"],
variable: "--font-cairo",
})
export default function RootLayout(props: { children: ReactNode }) {
const { children } = props
return (
<html lang="en" dir="ltr" suppressHydrationWarning>
<body
className={cn(
"[&:lang(en)]:font-lato [&:lang(ar)]:font-cairo", // Set font styles based on the language
"bg-background text-foreground antialiased overscroll-none", // Set background, text, , anti-aliasing styles, and overscroll behavior
latoFont.variable, // Include Lato font variable
cairoFont.variable // Include Cairo font variable
)}
>
<Providers locale="de">
{children}
<Toaster />
<Sonner />
<SwRegistration />
<PwaInstallPrompt />
</Providers>
</body>
</html>
)
}