Skip to content

Commit

Permalink
chore: typedoc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarenaldi committed May 8, 2024
1 parent d8b19df commit fcd04e3
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 11 deletions.
7 changes: 7 additions & 0 deletions .changeset/yellow-insects-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@lens-protocol/react": patch
"@lens-protocol/react-native": patch
"@lens-protocol/react-web": patch
---

**fixes:** typedoc for some hooks
12 changes: 1 addition & 11 deletions packages/react/src/authentication/useSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>(value: T) {
const ref = useRef<T>();

useEffect(() => {
ref.current = value;
}, [value]);

return ref.current;
}

export { LogoutReason, SessionType };

/**
Expand Down
9 changes: 9 additions & 0 deletions packages/react/src/experimental/credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand Down
3 changes: 3 additions & 0 deletions packages/react/src/experimental/useStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit fcd04e3

Please sign in to comment.