Navigation, state management, create rule button integration

This commit is contained in:
adilallo
2026-03-02 22:40:29 -07:00
parent 3e3d2881f5
commit 3a3e54d455
17 changed files with 370 additions and 139 deletions
+2 -17
View File
@@ -2,27 +2,12 @@
import { notFound } from "next/navigation";
import { use } from "react";
import type { CreateFlowStep } from "../types";
import { VALID_STEPS } from "../utils/flowSteps";
interface PageProps {
params: Promise<{ step: string }>;
}
/**
* Valid step IDs for the create rule flow
*/
const VALID_STEPS: CreateFlowStep[] = [
"informational",
"text",
"select",
"upload",
"review",
"cards",
"right-rail",
"final-review",
"completed",
];
/**
* Dynamic route handler for create flow steps
*
@@ -33,7 +18,7 @@ export default function CreateFlowStepPage({ params }: PageProps) {
const { step } = use(params);
// Validate step exists
if (!VALID_STEPS.includes(step as CreateFlowStep)) {
if (!(VALID_STEPS as readonly string[]).includes(step)) {
notFound();
}