@@ -8,14 +8,18 @@ import type {
88 __internal_UserVerificationProps ,
99 Clerk ,
1010 ClerkOptions ,
11- CreateOrganizationProps ,
11+ CreateOrganizationModalProps ,
1212 EnvironmentResource ,
1313 GoogleOneTapProps ,
14- OrganizationProfileProps ,
14+ OrganizationProfileModalProps ,
1515 SignInProps ,
16+ SignInModalProps ,
1617 SignUpProps ,
18+ SignUpModalProps ,
19+ UserProfileModalProps ,
1720 UserProfileProps ,
1821 WaitlistProps ,
22+ WaitlistModalProps ,
1923} from '@clerk/shared/types' ;
2024import { createDeferredPromise } from '@clerk/shared/utils' ;
2125import React , { Suspense , useCallback , useRef , useSyncExternalStore } from 'react' ;
@@ -161,16 +165,16 @@ interface ComponentsState {
161165 appearance : Appearance | undefined ;
162166 options : ClerkOptions | undefined ;
163167 googleOneTapModal : null | GoogleOneTapProps ;
164- signInModal : null | SignInProps ;
165- signUpModal : null | SignUpProps ;
166- userProfileModal : null | UserProfileProps ;
168+ signInModal : null | SignInModalProps ;
169+ signUpModal : null | SignUpModalProps ;
170+ userProfileModal : null | UserProfileModalProps ;
167171 userVerificationModal : null | __internal_UserVerificationProps ;
168- organizationProfileModal : null | OrganizationProfileProps ;
169- createOrganizationModal : null | CreateOrganizationProps ;
172+ organizationProfileModal : null | OrganizationProfileModalProps ;
173+ createOrganizationModal : null | CreateOrganizationModalProps ;
170174 enableOrganizationsPromptModal : null | __internal_EnableOrganizationsPromptProps ;
171175 blankCaptchaModal : null ;
172176 organizationSwitcherPrefetch : boolean ;
173- waitlistModal : null | WaitlistProps ;
177+ waitlistModal : null | WaitlistModalProps ;
174178 checkoutDrawer : {
175179 open : false ;
176180 props : null | __internal_CheckoutProps ;
@@ -502,7 +506,7 @@ const Components = (props: ComponentsProps) => {
502506 onClose = { ( ) => componentsControls . closeModal ( 'signIn' ) }
503507 onExternalNavigate = { ( ) => componentsControls . closeModal ( 'signIn' ) }
504508 startPath = { buildVirtualRouterUrl ( { base : '/sign-in' , path : urlStateParam ?. path } ) }
505- getContainer = { signInModal ?. getContainer }
509+ getContainer = { signInModal ?. getContainer ?? ( ( ) => null ) }
506510 componentName = { 'SignInModal' }
507511 >
508512 < SignInModal { ...signInModal } />
@@ -520,7 +524,7 @@ const Components = (props: ComponentsProps) => {
520524 onClose = { ( ) => componentsControls . closeModal ( 'signUp' ) }
521525 onExternalNavigate = { ( ) => componentsControls . closeModal ( 'signUp' ) }
522526 startPath = { buildVirtualRouterUrl ( { base : '/sign-up' , path : urlStateParam ?. path } ) }
523- getContainer = { signUpModal ?. getContainer }
527+ getContainer = { signUpModal ?. getContainer ?? ( ( ) => null ) }
524528 componentName = { 'SignUpModal' }
525529 >
526530 < SignInModal { ...disambiguateRedirectOptions ( signUpModal , 'signup' ) } />
@@ -541,7 +545,7 @@ const Components = (props: ComponentsProps) => {
541545 base : '/user' ,
542546 path : userProfileModal ?. __experimental_startPath || urlStateParam ?. path ,
543547 } ) }
544- getContainer = { userProfileModal ?. getContainer }
548+ getContainer = { userProfileModal ?. getContainer ?? ( ( ) => null ) }
545549 componentName = { 'UserProfileModal' }
546550 modalContainerSx = { { alignItems : 'center' } }
547551 modalContentSx = { t => ( { height : `min(${ t . sizes . $176 } , calc(100% - ${ t . sizes . $12 } ))` , margin : 0 } ) }
@@ -559,7 +563,7 @@ const Components = (props: ComponentsProps) => {
559563 onClose = { ( ) => componentsControls . closeModal ( 'userVerification' ) }
560564 onExternalNavigate = { ( ) => componentsControls . closeModal ( 'userVerification' ) }
561565 startPath = { buildVirtualRouterUrl ( { base : '/user-verification' , path : urlStateParam ?. path } ) }
562- getContainer = { userVerificationModal ?. getContainer }
566+ getContainer = { userVerificationModal ?. getContainer ?? ( ( ) => null ) }
563567 componentName = { 'UserVerificationModal' }
564568 modalContainerSx = { { alignItems : 'center' } }
565569 >
@@ -579,7 +583,7 @@ const Components = (props: ComponentsProps) => {
579583 base : '/organizationProfile' ,
580584 path : organizationProfileModal ?. __experimental_startPath || urlStateParam ?. path ,
581585 } ) }
582- getContainer = { organizationProfileModal ?. getContainer }
586+ getContainer = { organizationProfileModal ?. getContainer ?? ( ( ) => null ) }
583587 componentName = { 'OrganizationProfileModal' }
584588 modalContainerSx = { { alignItems : 'center' } }
585589 modalContentSx = { t => ( { height : `min(${ t . sizes . $176 } , calc(100% - ${ t . sizes . $12 } ))` , margin : 0 } ) }
@@ -597,7 +601,7 @@ const Components = (props: ComponentsProps) => {
597601 onClose = { ( ) => componentsControls . closeModal ( 'createOrganization' ) }
598602 onExternalNavigate = { ( ) => componentsControls . closeModal ( 'createOrganization' ) }
599603 startPath = { buildVirtualRouterUrl ( { base : '/createOrganization' , path : urlStateParam ?. path } ) }
600- getContainer = { createOrganizationModal ?. getContainer }
604+ getContainer = { createOrganizationModal ?. getContainer ?? ( ( ) => null ) }
601605 componentName = { 'CreateOrganizationModal' }
602606 modalContainerSx = { { alignItems : 'center' } }
603607 modalContentSx = { t => ( { height : `min(${ t . sizes . $120 } , calc(100% - ${ t . sizes . $12 } ))` , margin : 0 } ) }
@@ -615,7 +619,7 @@ const Components = (props: ComponentsProps) => {
615619 onClose = { ( ) => componentsControls . closeModal ( 'waitlist' ) }
616620 onExternalNavigate = { ( ) => componentsControls . closeModal ( 'waitlist' ) }
617621 startPath = { buildVirtualRouterUrl ( { base : '/waitlist' , path : urlStateParam ?. path } ) }
618- getContainer = { waitlistModal ?. getContainer }
622+ getContainer = { waitlistModal ?. getContainer ?? ( ( ) => null ) }
619623 componentName = { 'WaitlistModal' }
620624 >
621625 < WaitlistModal { ...waitlistModal } />
@@ -638,6 +642,7 @@ const Components = (props: ComponentsProps) => {
638642 canCloseModal = { false }
639643 modalId = { 'cl-modal-captcha-wrapper' }
640644 modalStyle = { { visibility : 'hidden' , pointerEvents : 'none' } }
645+ getContainer = { ( ) => null }
641646 >
642647 < BlankCaptchaModal />
643648 </ LazyModalRenderer >
0 commit comments