66 lines
1.5 KiB
TypeScript
66 lines
1.5 KiB
TypeScript
|
|
|
||
|
|
// import React from "react";
|
||
|
|
|
||
|
|
// export default function RootLayoutClient({ children }) {
|
||
|
|
// React.useEffect(() => {
|
||
|
|
// if ("serviceWorker" in navigator) {
|
||
|
|
// navigator.serviceWorker
|
||
|
|
// .register("/service-worker.js")
|
||
|
|
// .then((registration) => {
|
||
|
|
// console.log("Service Worker registered with scope:", registration.scope);
|
||
|
|
// })
|
||
|
|
// .catch((error) => {
|
||
|
|
// console.error("Service Worker registration failed:", error);
|
||
|
|
// });
|
||
|
|
// }
|
||
|
|
// }, []);
|
||
|
|
|
||
|
|
// return (
|
||
|
|
// <div className="text-white flex flex-col">
|
||
|
|
// <div className="container mx-auto px-4 max-w-[1024px]">
|
||
|
|
// {children}
|
||
|
|
// </div>
|
||
|
|
// </div>
|
||
|
|
// );
|
||
|
|
// }
|
||
|
|
|
||
|
|
import type { Metadata } from "next";
|
||
|
|
import { Geist, Geist_Mono } from "next/font/google";
|
||
|
|
import "./globals.css";
|
||
|
|
import React from "react";
|
||
|
|
import RootLayoutClient from "./layoutClient";
|
||
|
|
|
||
|
|
const geistSans = Geist({
|
||
|
|
variable: "--font-geist-sans",
|
||
|
|
subsets: ["latin"],
|
||
|
|
});
|
||
|
|
|
||
|
|
const geistMono = Geist_Mono({
|
||
|
|
variable: "--font-geist-mono",
|
||
|
|
subsets: ["latin"],
|
||
|
|
});
|
||
|
|
|
||
|
|
export const metadata: Metadata = {
|
||
|
|
title: "CoffeeChat",
|
||
|
|
description: "Start chatting with your communities",
|
||
|
|
};
|
||
|
|
|
||
|
|
export default function RootLayout({
|
||
|
|
children,
|
||
|
|
}: Readonly<{
|
||
|
|
children: React.ReactNode;
|
||
|
|
}>) {
|
||
|
|
|
||
|
|
return (
|
||
|
|
<html lang="en">
|
||
|
|
<body
|
||
|
|
className={`${geistSans.variable} ${geistMono.variable} antialiased h-full w-full`}
|
||
|
|
>
|
||
|
|
<RootLayoutClient>
|
||
|
|
{children}
|
||
|
|
</RootLayoutClient>
|
||
|
|
</body>
|
||
|
|
</html>
|
||
|
|
);
|
||
|
|
}
|