Skip to content

Commit b36b07f

Browse files
committed
Render ConfigureSSO content within OrganizationProfile
1 parent a3df96b commit b36b07f

2 files changed

Lines changed: 11 additions & 15 deletions

File tree

packages/ui/src/components/ConfigureSSO/ConfigureSSO.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,16 @@ const AuthenticatedContent = withCoreUserGuard(() => {
5858
flex: 1,
5959
})}
6060
>
61-
<ConfigureSSOCardProtect>
62-
<ConfigureSSOCardContent contentRef={contentRef} />
63-
</ConfigureSSOCardProtect>
61+
<ConfigureSSOProtect>
62+
<ConfigureSSOContent contentRef={contentRef} />
63+
</ConfigureSSOProtect>
6464
</Col>
6565
</ConfigureSSONavbar>
6666
</ProfileCard.Root>
6767
);
6868
});
6969

70-
const ConfigureSSOCardContent = ({ contentRef }: { contentRef: React.RefObject<HTMLDivElement> }) => {
70+
export const ConfigureSSOContent = ({ contentRef }: { contentRef: React.RefObject<HTMLDivElement> }) => {
7171
const {
7272
data: enterpriseConnections,
7373
isLoading: isLoadingEnterpriseConnections,
@@ -142,7 +142,7 @@ const ConfigureSSOSteps = () => {
142142
);
143143
};
144144

145-
const ConfigureSSOCardProtect = ({ children }: { children: React.ReactNode }) => {
145+
export const ConfigureSSOProtect = ({ children }: { children: React.ReactNode }) => {
146146
const { session } = useSession();
147147
const isPersonalWorkspace = !session?.lastActiveOrganizationId;
148148
const canManageEnterpriseConnections = useProtect(
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
11
import { useOrganization } from '@clerk/shared/react';
2+
import { useRef } from 'react';
23

3-
import { Col } from '@/ui/customizables';
4-
import { Header } from '@/ui/elements/Header';
4+
import { ConfigureSSOContent, ConfigureSSOProtect } from '../ConfigureSSO/ConfigureSSO';
55

66
export const OrganizationSelfServeSsoPage = () => {
77
const { organization } = useOrganization();
8+
const contentRef = useRef<HTMLDivElement>(null);
89

910
if (!organization) {
1011
// We should never reach this point, but we'll return null to make TS happy
1112
return null;
1213
}
1314

1415
return (
15-
<Col gap={4}>
16-
<Header.Root>
17-
<Header.Title
18-
title='Self-Serve SSO'
19-
textVariant='h2'
20-
/>
21-
</Header.Root>
22-
</Col>
16+
<ConfigureSSOProtect>
17+
<ConfigureSSOContent contentRef={contentRef} />
18+
</ConfigureSSOProtect>
2319
);
2420
};

0 commit comments

Comments
 (0)