2026-08-25 21:26:18 +02:00
|
|
|
import type { Metadata } from "next";
|
2026-08-25 07:51:38 +02:00
|
|
|
import { ReplayPlayerLoader } from "@/components/recordings/ReplayPlayerLoader";
|
2026-08-25 21:26:18 +02:00
|
|
|
import { getRecordingName } from "@/lib/db/queries/recordings";
|
|
|
|
|
|
|
|
|
|
export async function generateMetadata({ params }: { params: Promise<{ id: string }> }): Promise<Metadata> {
|
|
|
|
|
const { id } = await params;
|
|
|
|
|
const name = await getRecordingName(Number(id));
|
|
|
|
|
return { title: name ? `Replay ${name}` : "Replay" };
|
|
|
|
|
}
|
2026-08-25 07:51:38 +02:00
|
|
|
|
|
|
|
|
export default async function ReplayPage({ params }: { params: Promise<{ id: string }> }) {
|
|
|
|
|
const { id } = await params;
|
|
|
|
|
return (
|
|
|
|
|
<div className="flex flex-col gap-6">
|
2026-08-25 16:43:28 +02:00
|
|
|
<h1 className="font-heading text-2xl font-semibold">Replay</h1>
|
2026-08-25 07:51:38 +02:00
|
|
|
<ReplayPlayerLoader recordingId={Number(id)} />
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|