All checks were successful
Automated Container Build / build-and-push (push) Successful in 1m6s
Reviewed-on: #1
22 lines
599 B
TypeScript
22 lines
599 B
TypeScript
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="app-page">
|
|
{/* Dynamic Header & Tabs */}
|
|
<ClassHeader classSlug={classSlug} className={classData.name} />
|
|
|
|
{/* Page content */}
|
|
{props.children}
|
|
</div>
|
|
);
|
|
}
|