|
|
@@ -4,6 +4,10 @@ import "./styles/markdown.scss";
|
|
|
import "./styles/highlight.scss";
|
|
|
import { getClientConfig } from "./config/client";
|
|
|
import { type Metadata } from "next";
|
|
|
+import { SpeedInsights } from "@vercel/speed-insights/next";
|
|
|
+import { getServerSideConfig } from "./config/server";
|
|
|
+
|
|
|
+const serverConfig = getServerSideConfig();
|
|
|
|
|
|
export const metadata: Metadata = {
|
|
|
title: "NextChat",
|
|
|
@@ -35,7 +39,14 @@ export default function RootLayout({
|
|
|
<link rel="manifest" href="/site.webmanifest"></link>
|
|
|
<script src="/serviceWorkerRegister.js" defer></script>
|
|
|
</head>
|
|
|
- <body>{children}</body>
|
|
|
+ <body>
|
|
|
+ {children}
|
|
|
+ {serverConfig?.isVercel && (
|
|
|
+ <>
|
|
|
+ <SpeedInsights />
|
|
|
+ </>
|
|
|
+ )}
|
|
|
+ </body>
|
|
|
</html>
|
|
|
);
|
|
|
}
|