File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
app/(dashboard)/support/create-ticket/components Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export type Team = {
2424 image ?: string ;
2525 billingPlan : "pro" | "growth" | "free" | "starter" ;
2626 billingStatus : "validPayment" | ( string & { } ) | null ;
27+ supportPlan : "pro" | "growth" | "free" | "starter" ;
2728 billingEmail : string | null ;
2829 growthTrialEligible : false ;
2930 enabledScopes : EnabledTeamScope [ ] ;
Original file line number Diff line number Diff line change @@ -98,9 +98,10 @@ export async function createTicketAction(
9898 loginRedirect ( "/support" ) ;
9999 }
100100
101- const customerId = isValidPlan ( team . billingPlan )
102- ? planToCustomerId [ team . billingPlan ]
103- : undefined ;
101+ const customerId = isValidPlan ( team . supportPlan )
102+ ? planToCustomerId [ team . supportPlan ]
103+ // fallback to "free" tier
104+ : planToCustomerId . free ;
104105
105106 const product = formData . get ( "product" ) ?. toString ( ) || "" ;
106107 const problemArea = formData . get ( "extraInfo_Problem_Area" ) ?. toString ( ) || "" ;
You can’t perform that action at this time.
0 commit comments