- Alle @chessu/ → @michess/ (Package-Namen und Imports) - Theme-Namen chessuDark/Light → michessDark/Light - Alle Display-Texte: chessu/Michess → MiChess - Autor: dotnize → Tom Misch - Copyright: Nathaniel Tampus → Tom Misch - README komplett neu (Deutsch, MiChess-spezifisch) - CONTRIBUTING.md neu - FUNDING.yml + CODE_OF_CONDUCT.md entfernt - Fork-Hinweis auf chessu bleibt im README erhalten (MIT-Pflicht) - pnpm-lock.yaml entfernt (wird beim Build neu generiert) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
import GameAuthWrapper from "@/components/game/GameAuthWrapper";
|
|
import { fetchActiveGame } from "@/lib/game";
|
|
import { notFound } from "next/navigation";
|
|
|
|
export async function generateMetadata({ params }: { params: { code: string } }) {
|
|
const game = await fetchActiveGame(params.code);
|
|
if (!game) {
|
|
return {
|
|
description: "Game not found",
|
|
robots: {
|
|
index: false,
|
|
follow: false,
|
|
nocache: true,
|
|
noarchive: true
|
|
}
|
|
};
|
|
}
|
|
return {
|
|
description: `Play or watch a game with ${game.host?.name}`,
|
|
openGraph: {
|
|
title: "MiChess",
|
|
description: `Play or watch a game with ${game.host?.name}`,
|
|
url: `https://ches.su/${game.code}`,
|
|
siteName: "MiChess",
|
|
locale: "en_US",
|
|
type: "website"
|
|
},
|
|
robots: {
|
|
index: false,
|
|
follow: false,
|
|
nocache: true,
|
|
noarchive: true
|
|
}
|
|
};
|
|
}
|
|
|
|
export default async function Game({ params }: { params: { code: string } }) {
|
|
const game = await fetchActiveGame(params.code);
|
|
if (!game) {
|
|
notFound();
|
|
}
|
|
|
|
return <GameAuthWrapper initialLobby={game} />;
|
|
}
|