mirror of
https://github.com/massbug/judge4c.git
synced 2025-07-04 07:40:51 +00:00
27 lines
593 B
TypeScript
27 lines
593 B
TypeScript
import { notFound } from "next/navigation";
|
|
import { ProblemHeader } from "@/features/problems/components/header";
|
|
|
|
interface LayoutProps {
|
|
children: React.ReactNode;
|
|
params: Promise<{ problemId: string }>;
|
|
}
|
|
|
|
const Layout = async ({ children, params }: LayoutProps) => {
|
|
const { problemId } = await params;
|
|
|
|
if (!problemId) {
|
|
return notFound();
|
|
}
|
|
|
|
return (
|
|
<div className="flex flex-col h-screen">
|
|
<ProblemHeader />
|
|
<div className="flex w-full flex-grow overflow-y-hidden p-2.5 pt-0">
|
|
{children}
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default Layout;
|