Skip to content

Commit

Permalink
react: enable useLinkHandle and useUnlinkHandle hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysu committed Oct 20, 2023
1 parent 0687207 commit ac3bc50
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
8 changes: 8 additions & 0 deletions .changeset/smooth-ties-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@lens-protocol/api-bindings": minor
"@lens-protocol/domain": minor
"@lens-protocol/react": minor
"@lens-protocol/react-web": minor
---

Added useLinkHandle and useUnlinkHandle hooks
6 changes: 2 additions & 4 deletions examples/web/src/profiles/ProfilesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,8 @@ const profileHooks = [
path: '/profiles/useUpdateFollowPolicy',
},
{
label: 'useOwnedHandles',
// label: 'useOwnedHandles & useLinkHandle & useUnlinkHandle',
// description: `Link and unlink handle from a profile.`,
description: `Fetch all handles owned by a wallet.`,
label: 'useOwnedHandles & useLinkHandle & useUnlinkHandle',
description: `Link and unlink handle from a profile.`,
path: '/profiles/useOwnedHandles',
},
];
Expand Down
6 changes: 2 additions & 4 deletions examples/web/src/profiles/UseOwnedHandles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ function UseOwnedProfiles({ address }: { address: EvmAddress }) {
);
}

// eslint-disable-next-line
function UseOwnedHandlesInner({ address }: { address: EvmAddress }) {
const {
data: handleResult,
Expand Down Expand Up @@ -118,7 +117,7 @@ function Content({ address, profile }: ContentProps) {
</p>
<div style={{ display: 'flex' }}>
<UseOwnedProfiles address={address} />
{/* <UseOwnedHandlesInner address={address} /> */}
<UseOwnedHandlesInner address={address} />
</div>
</div>
);
Expand All @@ -128,8 +127,7 @@ export function UseOwnedHandles() {
return (
<div>
<h1>
{/* <code>useOwnedHandles & useLinkHandle & useUnlinkHandle</code> */}
<code>useOwnedHandles</code>
<code>useOwnedHandles & useLinkHandle & useUnlinkHandle</code>
</h1>

<WhenLoggedIn>
Expand Down
1 change: 0 additions & 1 deletion packages/react/src/transactions/useLinkHandle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export type LinkHandleArgs = {
*
* @category Profiles
* @group Hooks
* @experimental This hook is experimental and may change in future releases.
*/
export function useLinkHandle(): UseDeferredTask<
AsyncTransactionResult<void>,
Expand Down
1 change: 0 additions & 1 deletion packages/react/src/transactions/useUnlinkHandle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export type UnlinkHandleArgs = {
*
* @category Profiles
* @group Hooks
* @experimental This hook is experimental and may change in future releases.
*/
export function useUnlinkHandle(): UseDeferredTask<
AsyncTransactionResult<void>,
Expand Down

0 comments on commit ac3bc50

Please sign in to comment.