34 lines
882 B
TypeScript
34 lines
882 B
TypeScript
import { notFound } from 'next/navigation'
|
|
|
|
const menuItems = {
|
|
board: "https://example.com/board",
|
|
chapter: "https://example.com/chapter",
|
|
flow: "https://example.com/flow",
|
|
design: "https://example.com/design",
|
|
gitlab: "https://gitlab.com",
|
|
crm: "https://example.com/crm",
|
|
missions: "https://example.com/missions"
|
|
}
|
|
|
|
export default async function SectionPage({ params }: { params: Promise<{ section: string }> }) {
|
|
const { section } = await params;
|
|
|
|
const iframeUrl = menuItems[section as keyof typeof menuItems];
|
|
|
|
if (!iframeUrl) {
|
|
notFound();
|
|
}
|
|
|
|
return (
|
|
<div className="w-full h-[calc(100vh-8rem)]">
|
|
<iframe
|
|
src={iframeUrl}
|
|
className="w-full h-full border-none"
|
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
|
allowFullScreen
|
|
/>
|
|
</div>
|
|
);
|
|
}
|
|
|