Files
ApiCore/ApiCore-Frontend/src/app/layout.tsx
T
Nick Szaunig eb66c4bd53 feat: offline-fähige PWA mit IndexedDB-Sync für Durchsichten
Service Worker (public/sw.js) cached die App-Shell für Seiten-GETs
(network-first, cache-fallback). Durchsichten, die offline gespeichert
werden, landen in einer IndexedDB-Warteschlange (idb) statt zu
scheitern und werden automatisch synchronisiert, sobald wieder
Netzwerk verfügbar ist (Mount + online-Event), mit manuellem Retry
über ein Badge im App-Header. Ein modulweiter In-Flight-Lock in
sync.ts verhindert doppelte Synchronisierung bei gleichzeitigen
Aufrufen (gefunden über React-StrictMode-Doppel-Mount, das ohne den
Lock dieselbe Durchsicht zweimal anlegte).
2026-08-25 01:14:18 +02:00

44 lines
1.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import type { Metadata } from "next";
import { Space_Grotesk, Inter, IBM_Plex_Mono } from "next/font/google";
import "./globals.css";
import { Providers } from "./providers";
import { Toaster } from "@/components/ui/sonner";
import { ServiceWorkerRegistration } from "@/components/service-worker-registration";
const spaceGrotesk = Space_Grotesk({
variable: "--font-heading",
subsets: ["latin"],
weight: ["500", "600", "700"],
});
const inter = Inter({
variable: "--font-body",
subsets: ["latin"],
});
const plexMono = IBM_Plex_Mono({
variable: "--font-data",
subsets: ["latin"],
weight: ["400", "500"],
});
export const metadata: Metadata = {
title: "ApiCore – Imkereiverwaltung",
description: "Digitale Imkereiverwaltung für Wabenhain",
};
export default function RootLayout({ children }: LayoutProps<"/">) {
return (
<html
lang="de"
className={`${spaceGrotesk.variable} ${inter.variable} ${plexMono.variable} h-full antialiased`}
>
<body className="min-h-full flex flex-col">
<Providers>{children}</Providers>
<Toaster position="top-right" richColors />
<ServiceWorkerRegistration />
</body>
</html>
);
}