File tree Expand file tree Collapse file tree
apps/builder/app/dashboard/workspace Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -473,6 +473,12 @@ export const ManageMembersDialog = ({
473473 const failed = await inviteMembers ( emails , workspace . id , relation ) ;
474474 setInviting ( false ) ;
475475
476+ // Suppress the banner before optimistic entries trigger a re-render,
477+ // otherwise React renders the new member count with the old maxSeats.
478+ if ( boughtExtraSeats ) {
479+ setSuppressBanner ( true ) ;
480+ }
481+
476482 // Add optimistic entries only for emails that actually succeeded so that
477483 // non-existent or already-member emails never flicker into the list.
478484 const failedEmails = new Set ( failed . map ( ( f ) => f . split ( ":" ) [ 0 ] . trim ( ) ) ) ;
@@ -493,9 +499,8 @@ export const ManageMembersDialog = ({
493499 }
494500
495501 // When the invite triggered a Stripe Seats subscription, the webhook
496- // needs time to update the DB. Suppress the banner and delay refetch .
502+ // needs time to update the DB. Delay refetch; banner already suppressed .
497503 if ( boughtExtraSeats && succeeded . length > 0 ) {
498- setSuppressBanner ( true ) ;
499504 setTimeout ( ( ) => {
500505 handleRefresh ( ) ;
501506 revalidator . revalidate ( ) ;
You can’t perform that action at this time.
0 commit comments