Skip to content

Commit 300f14a

Browse files
committed
Simplified the downgrade reasons logic
1 parent 0877a70 commit 300f14a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/webapp/app/routes/resources.orgs.$organizationSlug.select-plan.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
7171

7272
const form = schema.parse({
7373
...Object.fromEntries(formData),
74-
reasons: reasons.length > 1 ? reasons : reasons[0] || undefined,
74+
reasons,
7575
message: message || undefined,
7676
});
7777

@@ -150,7 +150,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
150150
text: "Reasons:",
151151
}),
152152
uiComponent.text({
153-
text: Array.isArray(reasons) ? reasons.join(", ") : reasons,
153+
text: reasons.join(", "),
154154
}),
155155
]
156156
: []),

0 commit comments

Comments
 (0)