// 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(null); useEffect(() => { const storedConsent = localStorage.getItem("CookieConsent"); setConsent(storedConsent); }, []); const handleConsentChange = (newConsent: string) => { setConsent(newConsent); }; return ( {children} {consent === "accepted" && } {consent === "accepted" && } ); }