-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(clerk-js,clerk-react): Share createContextAndHook
- Loading branch information
1 parent
262499e
commit fb37054
Showing
21 changed files
with
31 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/clerk-js/src/ui/elements/contexts/CardStateContext.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/clerk-js/src/ui/elements/contexts/FlowMetadataContext.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { createContextAndHook } from '@clerk/shared'; | ||
import { ClientResource } from '@clerk/types'; | ||
import React from 'react'; | ||
|
||
import { makeContextAndHook } from '../utils/makeContextAndHook'; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const [ClientContext, useClientContext] = makeContextAndHook<ClientResource | undefined | null>('ClientContext'); | ||
export const [ClientContext, useClientContext] = createContextAndHook<ClientResource | undefined | null>( | ||
'ClientContext', | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { createContextAndHook } from '@clerk/shared'; | ||
|
||
import IsomorphicClerk from '../isomorphicClerk'; | ||
import { makeContextAndHook } from '../utils/makeContextAndHook'; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const [IsomorphicClerkContext, useIsomorphicClerkContext] = | ||
makeContextAndHook<IsomorphicClerk>('IsomorphicClerkContext'); | ||
createContextAndHook<IsomorphicClerk>('IsomorphicClerkContext'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
import { createContextAndHook } from '@clerk/shared'; | ||
import { ActiveSessionResource } from '@clerk/types'; | ||
|
||
import { makeContextAndHook } from '../utils/makeContextAndHook'; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const [SessionContext, useSessionContext] = makeContextAndHook<ActiveSessionResource | null | undefined>( | ||
export const [SessionContext, useSessionContext] = createContextAndHook<ActiveSessionResource | null | undefined>( | ||
'SessionContext', | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
import { createContextAndHook } from '@clerk/shared'; | ||
import { UserResource } from '@clerk/types'; | ||
|
||
import { makeContextAndHook } from '../utils/makeContextAndHook'; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const [UserContext, useUserContext] = makeContextAndHook<UserResource | null | undefined>('UserContext'); | ||
export const [UserContext, useUserContext] = createContextAndHook<UserResource | null | undefined>('UserContext'); |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './createContextAndHook'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './utils'; | ||
export * from './hooks'; |