Skip to content

Commit e5d7cff

Browse files
committed
fix(webapp): show conform v1 server errors in purchase modals
The schedules and branches add-on purchase modals detected conform responses with "intent" in fetcher.data, but conform v1's submission.reply() returns a status field, not intent, so lastResult was always undefined and server-side errors never rendered. Switch the guard to "status" in fetcher.data, matching the rest of the migration.
1 parent 971ffea commit e5d7cff

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

apps/webapp/app/components/schedules/PurchaseSchedulesModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export function PurchaseSchedulesModal({
5454
const showSelfServe = useShowSelfServe();
5555
const fetcher = useFetcher();
5656
const lastSubmission =
57-
fetcher.data && typeof fetcher.data === "object" && "intent" in fetcher.data
57+
fetcher.data && typeof fetcher.data === "object" && "status" in fetcher.data
5858
? fetcher.data
5959
: undefined;
6060
const [form, { amount }] = useForm({

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.branches/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ function PurchaseBranchesModal({
674674
const showSelfServe = useShowSelfServe();
675675
const fetcher = useFetcher();
676676
const lastSubmission =
677-
fetcher.data && typeof fetcher.data === "object" && "intent" in fetcher.data
677+
fetcher.data && typeof fetcher.data === "object" && "status" in fetcher.data
678678
? fetcher.data
679679
: undefined;
680680
const [form, { amount }] = useForm({

0 commit comments

Comments
 (0)