44 lines
1.2 KiB
TypeScript
44 lines
1.2 KiB
TypeScript
// app/layout.tsx
|
|
|
|
"use client";
|
|
|
|
import {SpeedInsights} from "@vercel/speed-insights/next";
|
|
import {Analytics} from "@vercel/analytics/next";
|
|
import "./globals.css";
|
|
|
|
import {Roboto} from 'next/font/google';
|
|
import React, {useEffect, useState} from "react";
|
|
//import ClientCookieConsentBanner from "./components/ClientCookieConsentBanner";
|
|
|
|
|
|
const roboto = Roboto({
|
|
variable: '--font-roboto',
|
|
weight: '400',
|
|
subsets: ['latin'],
|
|
});
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode;
|
|
}) {
|
|
const [consent, setConsent] = useState<string | null>(null);
|
|
|
|
useEffect(() => {
|
|
const storedConsent = localStorage.getItem("CookieConsent");
|
|
setConsent(storedConsent);
|
|
}, []);
|
|
|
|
const handleConsentChange = (newConsent: string) => {
|
|
setConsent(newConsent);
|
|
};
|
|
|
|
return (
|
|
<html lang="en">
|
|
<script defer src="http://umami.denshooter.de:3010/script.js" data-website-id="1f213877-deef-4238-8df1-71a5a3bcd142"></script>
|
|
<body className={roboto.variable}>
|
|
{children}
|
|
</body>
|
|
</html>
|
|
);
|
|
} |