import { notFound, permanentRedirect } from "next/navigation"; import { connection } from "next/server"; import { loadPublicPage } from "@/lib/content/loaders"; export default async function CharacterPage({ params, }: { params: Promise<{ character: string }>; }) { await connection(); const { character } = await params; const result = await loadPublicPage(character); if (result.type === "redirect") permanentRedirect(result.location); notFound(); }