Files
community-rule/app/create/[screenId]/page.tsx
T
2026-04-13 18:24:13 -06:00

23 lines
584 B
TypeScript

"use client";
import { notFound } from "next/navigation";
import { use } from "react";
import { CreateFlowScreenView } from "../screens/CreateFlowScreenView";
import { isValidStep } from "../utils/flowSteps";
import type { CreateFlowStep } from "../types";
interface PageProps {
params: Promise<{ screenId: string }>;
}
export default function CreateFlowScreenPage({ params }: PageProps) {
const { screenId: raw } = use(params);
if (!isValidStep(raw)) {
notFound();
}
const screenId = raw as CreateFlowStep;
return <CreateFlowScreenView screenId={screenId} />;
}