10 lines
343 B
TypeScript
10 lines
343 B
TypeScript
import { redirect } from "next/navigation";
|
|
|
|
type Props = { params: Promise<{ slug: string }> };
|
|
|
|
/** Compat: /read/[slug] → /book/read#slug (hash preserved by browser on redirect when possible) */
|
|
export default async function ReadSlugCompatRedirect({ params }: Props) {
|
|
const { slug } = await params;
|
|
redirect(`/book/read#${slug}`);
|
|
}
|