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 @@ -429,6 +429,7 @@ export const ManageMembersDialog = ({
429429 relation : Role ;
430430 extraSeats : number ;
431431 } > ( ) ;
432+ const [ suppressBanner , setSuppressBanner ] = useState ( false ) ;
432433 const formRef = useRef < HTMLFormElement > ( null ) ;
433434
434435 const { load, data } = trpcClient . workspace . listMembers . useQuery ( ) ;
@@ -492,11 +493,13 @@ export const ManageMembersDialog = ({
492493 }
493494
494495 // When the invite triggered a Stripe Seats subscription, the webhook
495- // needs time to update the DB. Delay refetch so the banner doesn't flash .
496+ // needs time to update the DB. Suppress the banner and delay refetch .
496497 if ( boughtExtraSeats && succeeded . length > 0 ) {
498+ setSuppressBanner ( true ) ;
497499 setTimeout ( ( ) => {
498500 handleRefresh ( ) ;
499501 revalidator . revalidate ( ) ;
502+ setSuppressBanner ( false ) ;
500503 } , 4000 ) ;
501504 return ;
502505 }
@@ -597,7 +600,7 @@ export const ManageMembersDialog = ({
597600 </ Flex >
598601 </ Flex >
599602 ) }
600- { isOwner && overCapacity > 0 && (
603+ { isOwner && overCapacity > 0 && suppressBanner === false && (
601604 < PanelBanner variant = "warning" >
602605 < Flex direction = "column" gap = "2" >
603606 < Text >
You can’t perform that action at this time.
0 commit comments