Skip to content

Commit 36ae016

Browse files
committed
Add protect as children of content
1 parent 9772afb commit 36ae016

2 files changed

Lines changed: 16 additions & 20 deletions

File tree

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ const AuthenticatedContent = withCoreUserGuard(() => {
5858
flex: 1,
5959
})}
6060
>
61-
<ConfigureSSOProtect>
62-
<ConfigureSSOContent contentRef={contentRef} />
63-
</ConfigureSSOProtect>
61+
<ConfigureSSOContent contentRef={contentRef} />
6462
</Col>
6563
</ConfigureSSONavbar>
6664
</ProfileCard.Root>
@@ -86,16 +84,18 @@ export const ConfigureSSOContent = ({ contentRef }: { contentRef: React.RefObjec
8684
}
8785

8886
return (
89-
<ConfigureSSOProvider
90-
hasSuccessfulTestRun={hasSuccessfulTestRun}
91-
enterpriseConnection={enterpriseConnection}
92-
contentRef={contentRef}
93-
createEnterpriseConnection={createEnterpriseConnection}
94-
updateEnterpriseConnection={updateEnterpriseConnection}
95-
deleteEnterpriseConnection={deleteEnterpriseConnection}
96-
>
97-
<ConfigureSSOSteps />
98-
</ConfigureSSOProvider>
87+
<ConfigureSSOProtect>
88+
<ConfigureSSOProvider
89+
hasSuccessfulTestRun={hasSuccessfulTestRun}
90+
enterpriseConnection={enterpriseConnection}
91+
contentRef={contentRef}
92+
createEnterpriseConnection={createEnterpriseConnection}
93+
updateEnterpriseConnection={updateEnterpriseConnection}
94+
deleteEnterpriseConnection={deleteEnterpriseConnection}
95+
>
96+
<ConfigureSSOSteps />
97+
</ConfigureSSOProvider>
98+
</ConfigureSSOProtect>
9999
);
100100
};
101101

@@ -151,7 +151,7 @@ const ConfigureSSOSteps = () => {
151151
);
152152
};
153153

154-
export const ConfigureSSOProtect = ({ children }: { children: React.ReactNode }) => {
154+
const ConfigureSSOProtect = ({ children }: { children: React.ReactNode }) => {
155155
const { session } = useSession();
156156
const isPersonalWorkspace = !session?.lastActiveOrganizationId;
157157
const canManageEnterpriseConnections = useProtect(
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useOrganization } from '@clerk/shared/react';
22
import { useRef } from 'react';
33

4-
import { ConfigureSSOContent, ConfigureSSOProtect } from '../ConfigureSSO/ConfigureSSO';
4+
import { ConfigureSSOContent } from '../ConfigureSSO/ConfigureSSO';
55

66
export const OrganizationSelfServeSSOPage = () => {
77
const { organization } = useOrganization();
@@ -12,9 +12,5 @@ export const OrganizationSelfServeSSOPage = () => {
1212
return null;
1313
}
1414

15-
return (
16-
<ConfigureSSOProtect>
17-
<ConfigureSSOContent contentRef={contentRef} />
18-
</ConfigureSSOProtect>
19-
);
15+
return <ConfigureSSOContent contentRef={contentRef} />;
2016
};

0 commit comments

Comments
 (0)