2025-03-20 08:12:23 +00:00
|
|
|
import { notFound } from "next/navigation";
|
2025-05-13 08:14:57 +00:00
|
|
|
import { ProblemHeader } from "@/features/problems/components/header";
|
2025-03-08 10:00:13 +00:00
|
|
|
|
2025-05-06 13:04:45 +00:00
|
|
|
interface ProblemLayoutProps {
|
|
|
|
children: React.ReactNode;
|
2025-05-07 06:47:20 +00:00
|
|
|
params: Promise<{ problemId: string }>;
|
2025-03-08 10:00:13 +00:00
|
|
|
}
|
|
|
|
|
2025-04-04 09:03:55 +00:00
|
|
|
export default async function ProblemLayout({
|
2025-05-06 13:04:45 +00:00
|
|
|
children,
|
2025-03-20 08:12:23 +00:00
|
|
|
params,
|
2025-05-06 13:04:45 +00:00
|
|
|
}: ProblemLayoutProps) {
|
2025-05-07 06:47:20 +00:00
|
|
|
const { problemId } = await params;
|
2025-03-20 08:12:23 +00:00
|
|
|
|
2025-05-07 06:47:20 +00:00
|
|
|
if (!problemId) {
|
2025-04-13 03:56:01 +00:00
|
|
|
return notFound();
|
|
|
|
}
|
|
|
|
|
2025-03-08 10:00:13 +00:00
|
|
|
return (
|
2025-04-04 09:03:55 +00:00
|
|
|
<div className="flex flex-col h-screen">
|
2025-05-06 13:04:45 +00:00
|
|
|
<ProblemHeader />
|
2025-06-13 06:03:17 +00:00
|
|
|
<div className="flex w-full flex-grow overflow-y-hidden p-2.5 pt-0">
|
|
|
|
{children}
|
|
|
|
</div>
|
2025-03-08 10:00:13 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|