11import { useOrganization } from '@clerk/shared/react' ;
2- import type { OrganizationProfileModalProps , OrganizationProfileProps } from '@clerk/types' ;
2+ import type { OrganizationProfileModalProps , OrganizationProfileProps , WithInternalRouting } from '@clerk/types' ;
33import React from 'react' ;
4+ import type { OrganizationProfileCtx } from 'ui/types' ;
45
56import { OrganizationProfileContext , withCoreUserGuard } from '../../contexts' ;
67import { Flow , localizationKeys } from '../../customizables' ;
78import { NavbarMenuButtonRow , ProfileCard , withCardStateProvider } from '../../elements' ;
89import { Route , Switch } from '../../router' ;
9- import type { OrganizationProfileCtx } from '../../types' ;
1010import { OrganizationProfileNavbar } from './OrganizationProfileNavbar' ;
1111import { OrganizationProfileRoutes } from './OrganizationProfileRoutes' ;
1212
13- const _OrganizationProfile = ( _ : OrganizationProfileProps ) => {
13+ const _OrganizationProfile = ( ) => {
1414 const { organization } = useOrganization ( ) ;
1515
1616 if ( ! organization ) {
@@ -48,6 +48,9 @@ const AuthenticatedRoutes = withCoreUserGuard(() => {
4848
4949export const OrganizationProfile = withCardStateProvider ( _OrganizationProfile ) ;
5050
51+ const InternalOrganizationProfile : React . ComponentType < WithInternalRouting < OrganizationProfileProps > > =
52+ withCardStateProvider ( _OrganizationProfile ) ;
53+
5154export const OrganizationProfileModal = ( props : OrganizationProfileModalProps ) : JSX . Element => {
5255 const organizationProfileProps : OrganizationProfileCtx = {
5356 ...props ,
@@ -61,7 +64,7 @@ export const OrganizationProfileModal = (props: OrganizationProfileModalProps):
6164 < OrganizationProfileContext . Provider value = { organizationProfileProps } >
6265 { /*TODO: Used by InvisibleRootBox, can we simplify? */ }
6366 < div >
64- < OrganizationProfile { ...organizationProfileProps } />
67+ < InternalOrganizationProfile { ...organizationProfileProps } />
6568 </ div >
6669 </ OrganizationProfileContext . Provider >
6770 </ Route >
0 commit comments