import { redirect } from "next/navigation"; interface PageProps { params: Promise<{ slug: string }>; } export default async function CourseDashboardPage({ params }: PageProps) { // 1. Get the slug from the URL const { slug } = await params; // 2. Automatically redirect to the Edit page // This saves us from building a separate "Stats" page for now redirect(`/teacher/courses/${slug}/edit`); }