Something went wrong. Try again.
a tool for shared writing and social publishing
Something went wrong. Try again.
TSX
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889import { ViewportSizeLayout } from "components/ViewportSizeLayout";import { InitialPageLoad } from "../components/InitialPageLoadProvider";import { ServiceWorker } from "../components/ServiceWorker";import { Analytics } from "@vercel/analytics/react";import "./globals.css";import localFont from "next/font/local";import { PopUpProvider } from "components/Toast";import { StaleClientNotice } from "components/Blocks/TextBlock/schemaVersion";import { TrackPageView } from "components/TrackPageView";
export const metadata = { title: "Leaflet", description: "Read and publish on the Atmosphere", metadataBase: new URL(`https://leaflet.pub`), openGraph: { images: ["/open-graph.png"], }, twitter: { card: "summary_large_image", }, appleWebApp: { title: "Leaflet", statusBarStyle: "black-translucent", capable: true, },};
export const viewport = { themeColor: "#ffffff", minimumScale: 1, initialScale: 1, maximumScale: 1, width: "device-width", viewportFit: "cover", interactiveWidget: "resizes-content",};
export const preferredRegion = ["sfo1"];
const quattro = localFont({ src: [ { path: "../public/fonts/iaw-quattro-vf.woff2", style: "normal", }, { path: "../public/fonts/iaw-quattro-vf-Italic.woff2", style: "italic", }, ], display: "swap", variable: "--font-quattro",});
export default function RootLayout({ children,}: { children: React.ReactNode;}) { return ( <html suppressHydrationWarning lang="en" className={`${quattro.variable}`}> <body> <script dangerouslySetInnerHTML={{ __html: ` let listener = () => { let el = document.querySelector(":root"); el.style.setProperty("--leaflet-height-unitless", window.innerHeight) el.style.setProperty("--leaflet-width-unitless", window.innerWidth) } listener() window.addEventListener("resize", listener) `, }} /> <Analytics /> <TrackPageView /> <ServiceWorker /> <InitialPageLoad> <PopUpProvider> <StaleClientNotice /> <ViewportSizeLayout>{children}</ViewportSizeLayout> </PopUpProvider> </InitialPageLoad> </body> </html> );}