advance
This commit is contained in:
14
app/(protected)/teacher/courses/[slug]/page.tsx
Normal file
14
app/(protected)/teacher/courses/[slug]/page.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
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`);
|
||||
}
|
||||
Reference in New Issue
Block a user