Skip to content

Commit 03ffcf2

Browse files
panteliselefoctoper
authored andcommitted
fix(clerk-react): Using wrong OrganizationCustomPermission type (#2310)
1 parent 724b326 commit 03ffcf2

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.changeset/old-timers-obey.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createContextAndHook } from '@clerk/shared/react';
2-
import type { ActJWTClaim, MembershipRole, OrganizationCustomPermission } from '@clerk/types';
2+
import type { ActJWTClaim, MembershipRole, OrganizationCustomPermissionKey } from '@clerk/types';
33

44
export const [AuthContext, useAuthContext] = createContextAndHook<{
55
userId: string | null | undefined;
@@ -8,5 +8,5 @@ export const [AuthContext, useAuthContext] = createContextAndHook<{
88
orgId: string | null | undefined;
99
orgRole: MembershipRole | null | undefined;
1010
orgSlug: string | null | undefined;
11-
orgPermissions: OrganizationCustomPermission[] | null | undefined;
11+
orgPermissions: OrganizationCustomPermissionKey[] | null | undefined;
1212
}>('AuthContext');

packages/react/src/utils/deriveState.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type {
22
ActiveSessionResource,
33
InitialState,
44
MembershipRole,
5-
OrganizationCustomPermission,
5+
OrganizationCustomPermissionKey,
66
OrganizationResource,
77
Resources,
88
UserResource,
@@ -23,7 +23,7 @@ const deriveFromSsrInitialState = (initialState: InitialState) => {
2323
const organization = initialState.organization as OrganizationResource;
2424
const orgId = initialState.orgId;
2525
const orgRole = initialState.orgRole as MembershipRole;
26-
const orgPermissions = initialState.orgPermissions as OrganizationCustomPermission[];
26+
const orgPermissions = initialState.orgPermissions as OrganizationCustomPermissionKey[];
2727
const orgSlug = initialState.orgSlug;
2828
const actor = initialState.actor;
2929

0 commit comments

Comments
 (0)