refactor(app): move auth gating and metadata to server-first patterns

This commit is contained in:
2026-04-03 18:55:13 +02:00
parent 9c8cd364b4
commit df2a6c1759
4 changed files with 309 additions and 328 deletions

View File

@@ -1,4 +1,5 @@
import type { Metadata } from "next";
import Script from "next/script";
import { Manrope } from "next/font/google";
import * as Sentry from "@sentry/nextjs";
import "./globals.css";
@@ -11,8 +12,34 @@ import { getLocale, getMessages, getTimeZone } from "next-intl/server";
const manrope = Manrope({ subsets: ["latin"], variable: "--font-sans" });
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
metadataBase: new URL("https://app.lemonspace.io"),
title: {
default: "LemonSpace",
template: "%s | LemonSpace",
},
description: "LemonSpace is a platform for creating and sharing digital content with nodes.",
keywords: ["LemonSpace", "digital content", "platform", "nodes"],
authors: [{ name: "LemonSpace" }],
robots: {
index: true,
follow: true,
googleBot: {
index: true,
follow: true,
},
},
openGraph: {
type: "website",
url: "https://app.lemonspace.io",
siteName: "LemonSpace",
title: "LemonSpace",
description: "LemonSpace is a platform for creating and sharing digital content with nodes.",
},
twitter: {
card: "summary_large_image",
title: "LemonSpace",
description: "LemonSpace is a platform for creating and sharing digital content with nodes.",
},
};
export default async function RootLayout({
@@ -41,25 +68,12 @@ export default async function RootLayout({
suppressHydrationWarning
className={cn("h-full", "antialiased", "font-sans", manrope.variable)}
>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="Lemonspace is a platform for creating and sharing digital content with nodes."
/>
<meta name="keywords" content="Lemonspace, digital content, platform" />
<meta name="author" content="Lemonspace" />
<meta name="robots" content="index, follow" />
<meta name="googlebot" content="index, follow" />
<meta name="bingbot" content="index, follow" />
<meta name="yandexbot" content="index, follow" />
<script
<body className="min-h-full flex flex-col">
<Script
src="https://rybbit.matthias.lol/api/script.js"
data-site-id="bb1ac546eda7"
defer
></script>
</head>
<body className="min-h-full flex flex-col">
strategy="afterInteractive"
/>
<Providers
initialToken={initialToken}
locale={locale}