From a4293117d8932ae46fc102ac09d3bca1b465d398 Mon Sep 17 00:00:00 2001 From: Leonardo Zizzamia Date: Tue, 5 Mar 2024 23:17:11 -0800 Subject: [PATCH] fix: format (#227) --- .changeset/gold-impalas-retire.md | 2 +- site/docs/pages/identity/introduction.mdx | 1 - site/docs/pages/identity/use-avatar.mdx | 12 +++--------- site/docs/pages/identity/use-name.mdx | 12 +++--------- site/sidebar.ts | 2 +- src/version.ts | 2 +- 6 files changed, 9 insertions(+), 22 deletions(-) diff --git a/.changeset/gold-impalas-retire.md b/.changeset/gold-impalas-retire.md index 59db2d72dc..40823aa397 100644 --- a/.changeset/gold-impalas-retire.md +++ b/.changeset/gold-impalas-retire.md @@ -2,7 +2,7 @@ '@coinbase/onchainkit': minor --- -**feat**: Replace internal `useOnchainActionWithCache` with `tanstack/react-query`. This affects `useName` and `useAvatar` hooks. The return type and the input parameters also changed for these 2 hooks. +- **feat**: Replace internal `useOnchainActionWithCache` with `tanstack/react-query`. This affects `useName` and `useAvatar` hooks. The return type and the input parameters also changed for these 2 hooks. BREAKING CHANGES diff --git a/site/docs/pages/identity/introduction.mdx b/site/docs/pages/identity/introduction.mdx index f515c3cb73..5e4da2c04d 100644 --- a/site/docs/pages/identity/introduction.mdx +++ b/site/docs/pages/identity/introduction.mdx @@ -34,7 +34,6 @@ pnpm add @coinbase/onchainkit react@18 react-dom@18 graphql@14 graphql-request@6 ::: - ## Components If you are using any of the provided components, you will need to install and configure `@tanstack/react-query` and wrap your app in ``. diff --git a/site/docs/pages/identity/use-avatar.mdx b/site/docs/pages/identity/use-avatar.mdx index 846882e08b..ba730d766a 100644 --- a/site/docs/pages/identity/use-avatar.mdx +++ b/site/docs/pages/identity/use-avatar.mdx @@ -1,6 +1,7 @@ # `useAvatar` -The `useAvatar` hook is used to get avatar image url from an onchain identity provider for a given name. +The `useAvatar` hook is used to get avatar image url from an onchain identity +provider for a given name. Supported providers: @@ -11,14 +12,7 @@ Supported providers: ```tsx import { useAvatar } from '@coinbase/onchainkit/identity'; -// Return type signature is following @tanstack/react-query useQuery hook signature -const { - data: avatar, - isLoading, - isError, - error, - status, -} = useAvatar({ ensName: 'vitalik.eth' }, { enabled: true, cacheTime: 1000 * 60 * 60 * 24 }); +const { data: avatar, isLoading } = useAvatar({ ensName: 'vitalik.eth' }); ``` ## Props diff --git a/site/docs/pages/identity/use-name.mdx b/site/docs/pages/identity/use-name.mdx index c9267a6568..5fb9949d80 100644 --- a/site/docs/pages/identity/use-name.mdx +++ b/site/docs/pages/identity/use-name.mdx @@ -1,6 +1,7 @@ # `useName` -The `useName` hook is used to get name from an onchain identity provider for a given address. +The `useName` hook is used to get name from an onchain identity provider +for a given address. Supported providers: @@ -11,14 +12,7 @@ Supported providers: ```tsx import { useName } from '@coinbase/onchainkit/identity'; -// Return type signature is following @tanstack/react-query useQuery hook signature -const { - data: name, - isLoading, - isError, - error, - status, -} = useName({ address: '0x1234' }, { enabled: true, cacheTime: 1000 * 60 * 60 * 24 }); +const { data: name, isLoading } = useName({ address: '0x1234' }); ``` ## Props diff --git a/site/sidebar.ts b/site/sidebar.ts index 513fef8c45..7f39d05074 100644 --- a/site/sidebar.ts +++ b/site/sidebar.ts @@ -85,7 +85,7 @@ export const sidebar = [ ], }, { - text: 'React Hooks', + text: 'Hooks', items: [ { text: 'useName', diff --git a/src/version.ts b/src/version.ts index 9172061ef6..6b9f1bb034 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const version = '0.9.12'; +export const version = '0.10.0';