Files
community-rule/lib/create/buildCreateFlowDraftPayload.ts
T
2026-05-20 19:58:32 -06:00

13 lines
378 B
TypeScript

import type { CreateFlowState, CreateFlowStep } from "../../app/(app)/create/types";
/** Snapshot for save-progress / draft transfer (includes optional resume step). */
export function buildCreateFlowDraftPayload(
state: CreateFlowState,
currentStep?: CreateFlowStep | null,
): CreateFlowState {
return {
...state,
...(currentStep ? { currentStep } : {}),
};
}