Open Kamasah-Dickson opened 4 months ago
this is my app/layout file. commented it out to wait for a fix.
import type { Metadata } from "next";
import { Roboto } from "next/font/google";
import "./globals.scss";
import { SATSATmetadata } from "@/utils/metadata";
import NextTopLoader from "nextjs-toploader";
import "react-tooltip/dist/react-tooltip.css";
import { Toaster } from "react-hot-toast";
import { getServerSession } from "next-auth";
import SessionProvider from "@/components/SessionProvider";
import { options } from "./api/auth/[...nextauth]/options";
// import { Analytics } from "@vercel/analytics/react";
import { SpeedInsights } from "@vercel/speed-insights/next";
const roboto = Roboto({
subsets: ["latin", "greek"],
weight: ["300", "400", "500", "700", "900"],
});
export const metadata: Metadata = SATSATmetadata;
export default async function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
const session = await getServerSession(options);
return (
<html lang="en">
<body className={`antialiased ${roboto.className}`}>
<NextTopLoader
showSpinner={false}
color="#29a173"
initialPosition={0.04}
crawlSpeed={300}
height={2}
crawl={true}
easing="ease"
speed={350}
shadow="0 0 10px #29a173,0 0 5px #29a173"
/>
<Toaster />
<SessionProvider session={session}>{children}</SessionProvider>
{/* <Analytics
beforeSend={(event) => {
const url = new URL(event.url);
url.searchParams.delete("plan");
return {
...event,
url: url.toString(),
};
}}
/> */}
<SpeedInsights />
</body>
</html>
);
}
have you found a solution to this?
Edit by maintainer bot: Comment was automatically minimized because it was considered unhelpful. (If you think this was by mistake, let us know). Please only comment if it adds context to the issue. If you want to express that you have the same problem, use the upvote 👍 on the issue description or subscribe to the issue for updates. Thanks!
Verify canary release
Provide environment information
Which example does this report relate to?
https://vercel.com/docs/analytics/quickstart#add-the-analytics-component-to-your-app
What browser are you using? (if relevant)
Chrome
How are you deploying your application? (if relevant)
Vercel
Describe the Bug
I wanted to test the vercel analytics and followed the docs and I got an error