diff --git a/apps/marketing/src/app/(marketing)/singleplayer/client.tsx b/apps/marketing/src/app/(marketing)/singleplayer/client.tsx index 74158249a..bd756592e 100644 --- a/apps/marketing/src/app/(marketing)/singleplayer/client.tsx +++ b/apps/marketing/src/app/(marketing)/singleplayer/client.tsx @@ -246,7 +246,7 @@ export const SinglePlayerClient = () => { recipients={uploadedFile ? [placeholderRecipient] : []} fields={fields} onSubmit={onFieldsSubmit} - isSinglePlayerMode={true} + canGoBack={true} /> diff --git a/packages/ui/primitives/document-flow/add-fields.tsx b/packages/ui/primitives/document-flow/add-fields.tsx index f3e4c3544..19cfb0429 100644 --- a/packages/ui/primitives/document-flow/add-fields.tsx +++ b/packages/ui/primitives/document-flow/add-fields.tsx @@ -53,7 +53,7 @@ export type AddFieldsFormProps = { recipients: Recipient[]; fields: Field[]; onSubmit: (_data: TAddFieldsFormSchema) => void; - isSinglePlayerMode?: boolean; + canGoBack?: boolean; }; export const AddFieldsFormPartial = ({ @@ -62,12 +62,13 @@ export const AddFieldsFormPartial = ({ recipients, fields, onSubmit, - isSinglePlayerMode = false, + canGoBack = false, }: AddFieldsFormProps) => { const { isWithinPageBounds, getFieldPosition, getPage } = useDocumentElement(); const { currentStep, totalSteps, previousStep } = useStep(); const canRenderBackButtonAsRemove = - currentStep === 1 && typeof documentFlow.onBackStep === 'function' && isSinglePlayerMode; + currentStep === 1 && typeof documentFlow.onBackStep === 'function' && canGoBack; + const { control, handleSubmit,