Skip to content

Commit e5ccda6

Browse files
committed
fix(clerk-react): Using wrong OrganizationCustomPermission type
1 parent 6db2ad1 commit e5ccda6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
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)