Files
re-AstarCupWeb/app/layout.tsx
2026-02-03 23:43:13 +08:00

32 lines
652 B
TypeScript

import type { Metadata } from "next";
import "./globals.css";
import { prisma } from "@/app/lib/PrismaClient";
async function fetchData() {
const data = await prisma.tournamentConfig.findUnique({
where: { id: 1 },
});
return data;
}
export const metadata: Metadata = {
title: fetchData().then((data) => data?.tournament_name || "NoTitle").toString(),
description: "Generated by create next app",
};
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en">
<body
className={`antialiased`}
>
{children}
</body>
</html>
);
}