import type { Metadata } from "next"; import { notFound } from "next/navigation"; import { resolveShortLink } from "@/lib/share"; import { buildShareOgMeta } from "@/lib/share-og"; import { ogDefault } from "@/lib/og"; import { RedirectClient } from "./redirect-client"; type PageProps = { params: Promise<{ code: string }> }; export async function generateMetadata({ params, }: PageProps): Promise { const { code } = await params; const fullPath = await resolveShortLink(code); if (!fullPath) { return { title: "Link expired — Prabhupāda Says", robots: { index: false, follow: false }, ...ogDefault(), }; } return buildShareOgMeta(fullPath); } export default async function SharePage({ params }: PageProps) { const { code } = await params; const fullPath = await resolveShortLink(code); if (!fullPath) notFound(); return (

Redirecting to your highlight…

); }