Initial working commit
Some checks failed
Automated Container Build / build-and-push (push) Failing after 7s
Some checks failed
Automated Container Build / build-and-push (push) Failing after 7s
This commit is contained in:
parent
666ceb7325
commit
b7ce314f01
105 changed files with 35510 additions and 11 deletions
22
src/app/(protected)/[classSlug]/layout.tsx
Normal file
22
src/app/(protected)/[classSlug]/layout.tsx
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { getClassBySlug } from "@/services/classService";
|
||||
import { notFound } from "next/navigation";
|
||||
import { ClassHeader } from "@/components/ui/ClassHeader";
|
||||
|
||||
export default async function ClassLayout(props: LayoutProps<"/[classSlug]">) {
|
||||
const { classSlug } = await props.params;
|
||||
const classData = await getClassBySlug(classSlug);
|
||||
|
||||
if (!classData) {
|
||||
notFound();
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
||||
{/* Dynamic Header & Tabs */}
|
||||
<ClassHeader classSlug={classSlug} className={classData.name} />
|
||||
|
||||
{/* Page content */}
|
||||
{props.children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue