diff --git a/.changeset/yellow-insects-obey.md b/.changeset/yellow-insects-obey.md new file mode 100644 index 000000000..7130665ad --- /dev/null +++ b/.changeset/yellow-insects-obey.md @@ -0,0 +1,7 @@ +--- +"@lens-protocol/react": patch +"@lens-protocol/react-native": patch +"@lens-protocol/react-web": patch +--- + +**fixes:** typedoc for some hooks diff --git a/packages/react/src/authentication/useSession.ts b/packages/react/src/authentication/useSession.ts index d92a985fd..92a68a715 100644 --- a/packages/react/src/authentication/useSession.ts +++ b/packages/react/src/authentication/useSession.ts @@ -12,23 +12,13 @@ import { SessionType, } from '@lens-protocol/domain/use-cases/authentication'; import { EvmAddress, invariant, never } from '@lens-protocol/shared-kernel'; -import { useEffect, useRef } from 'react'; +import { useEffect } from 'react'; import { useLensApolloClient } from '../helpers/arguments'; import { ReadResult } from '../helpers/reads'; import { SuspenseEnabled, SuspenseResult } from '../helpers/suspense'; import { useLazyFragmentVariables } from '../helpers/variables'; -export function usePreviousValue(value: T) { - const ref = useRef(); - - useEffect(() => { - ref.current = value; - }, [value]); - - return ref.current; -} - export { LogoutReason, SessionType }; /** diff --git a/packages/react/src/experimental/credentials.ts b/packages/react/src/experimental/credentials.ts index b9acfae6b..233c20cc5 100644 --- a/packages/react/src/experimental/credentials.ts +++ b/packages/react/src/experimental/credentials.ts @@ -45,6 +45,9 @@ function useCredentials() { * * @experimental This API is VERY experimental and might change in the future. * @defaultValue `null` if not authenticated. + * + * @category Misc + * @group Hooks */ export function useAccessToken() { const credentials = useCredentials(); @@ -57,6 +60,9 @@ export function useAccessToken() { * * @experimental This API is VERY experimental and might change in the future. * @defaultValue `null` if not authenticated. + * + * @category Misc + * @group Hooks */ export function useIdentityToken() { const credentials = useCredentials(); @@ -69,6 +75,9 @@ export function useIdentityToken() { * * @experimental This API is VERY experimental and might change in the future. * @defaultValue `null` if not authenticated. + * + * @category Misc + * @group Hooks */ export function useRefreshToken() { const credentials = useCredentials(); diff --git a/packages/react/src/experimental/useStorage.ts b/packages/react/src/experimental/useStorage.ts index d57a72c97..13a4a507f 100644 --- a/packages/react/src/experimental/useStorage.ts +++ b/packages/react/src/experimental/useStorage.ts @@ -2,6 +2,9 @@ import { useSharedDependencies } from '../shared'; /** * Returns the {@link IStorageProvider} or {@link IObservableStorageProvider} instance defined in LensConfig. + * + * @category Misc + * @group Hooks */ export function useStorage() { const { config } = useSharedDependencies(); diff --git a/packages/react/src/transactions/publications/useOptimisticCreatePost.ts b/packages/react/src/transactions/publications/useOptimisticCreatePost.ts index 3f0b46e66..171b27126 100644 --- a/packages/react/src/transactions/publications/useOptimisticCreatePost.ts +++ b/packages/react/src/transactions/publications/useOptimisticCreatePost.ts @@ -263,6 +263,9 @@ export type OptimisticCreatePostError = * ``` * * @experimental This API is experimental and may change or be removed in future versions without honoring semver. + * + * @category Publications + * @group Hooks */ export function useOptimisticCreatePost( uploader: IUploader,