@@ -2,19 +2,20 @@ import { useOrganization } from '@clerk/shared/react';
22import type { OrganizationProfileModalProps , OrganizationProfileProps } from '@clerk/shared/types' ;
33import React from 'react' ;
44
5- import { withCardStateProvider } from '@/ui/elements/contexts' ;
6- import { NavbarMenuButtonRow } from '@/ui/elements/Navbar' ;
7- import { ProfileCard } from '@/ui/elements/ProfileCard' ;
5+ import { ORGANIZATION_PROFILE_CARD_SCROLLBOX_ID } from '@/constants' ;
6+ import { OrganizationProfileContext , SubscriberTypeContext , withCoreUserGuard } from '@/contexts' ;
7+ import { Flow , localizationKeys } from '@/customizables' ;
8+ import { withCardStateProvider } from '@/elements/contexts' ;
9+ import { NavbarMenuButtonRow } from '@/elements/Navbar' ;
10+ import { ProfileCard } from '@/elements/ProfileCard' ;
11+ import type { WithInternalRouting } from '@/internal' ;
12+ import { Route , Switch } from '@/router' ;
13+ import type { OrganizationProfileCtx } from '@/types' ;
814
9- import { ORGANIZATION_PROFILE_CARD_SCROLLBOX_ID } from '../../constants' ;
10- import { OrganizationProfileContext , SubscriberTypeContext , withCoreUserGuard } from '../../contexts' ;
11- import { Flow , localizationKeys } from '../../customizables' ;
12- import { Route , Switch } from '../../router' ;
13- import type { OrganizationProfileCtx } from '../../types' ;
1415import { OrganizationProfileNavbar } from './OrganizationProfileNavbar' ;
1516import { OrganizationProfileRoutes } from './OrganizationProfileRoutes' ;
1617
17- const _OrganizationProfile = ( _ : OrganizationProfileProps ) => {
18+ const OrganizationProfileInternal = ( ) => {
1819 const { organization } = useOrganization ( ) ;
1920
2021 if ( ! organization ) {
@@ -55,7 +56,11 @@ const AuthenticatedRoutes = withCoreUserGuard(() => {
5556 ) ;
5657} ) ;
5758
58- export const OrganizationProfile = withCardStateProvider ( _OrganizationProfile ) ;
59+ export const OrganizationProfile : React . ComponentType < OrganizationProfileProps > =
60+ withCardStateProvider ( OrganizationProfileInternal ) ;
61+
62+ const InternalOrganizationProfile : React . ComponentType < WithInternalRouting < OrganizationProfileProps > > =
63+ withCardStateProvider ( OrganizationProfileInternal ) ;
5964
6065export const OrganizationProfileModal = ( props : OrganizationProfileModalProps ) : JSX . Element => {
6166 const organizationProfileProps : OrganizationProfileCtx = {
@@ -70,7 +75,7 @@ export const OrganizationProfileModal = (props: OrganizationProfileModalProps):
7075 < OrganizationProfileContext . Provider value = { organizationProfileProps } >
7176 { /*TODO: Used by InvisibleRootBox, can we simplify? */ }
7277 < div >
73- < OrganizationProfile { ...organizationProfileProps } />
78+ < InternalOrganizationProfile { ...organizationProfileProps } />
7479 </ div >
7580 </ OrganizationProfileContext . Provider >
7681 </ Route >
0 commit comments