Skip to content

Commit a9dd26c

Browse files
committed
[SDK] Add missing use-client directives to some components (#5676)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on updating various components in the `thirdweb` package, specifically related to `Account`, `NFT`, `Chain`, and `Token` functionalities. It introduces new imports and ensures that the components are utilizing the necessary contexts and types. ### Detailed summary - In `Account/provider.tsx`: Added import for `Address`. - In `NFT/provider.tsx`: Added import for `ThirdwebContract`. - In `Account/blobbie.tsx`: Imported `Blobbie` and `useAccountContext`. - In `Chain/icon.tsx`, `Token/icon.tsx`, `NFT/name.tsx`, and `NFT/media.tsx`: Imported `UseQueryOptions`, `useQuery`, and `getChainMetadata`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 5b24faf commit a9dd26c

File tree

7 files changed

+13
-0
lines changed

7 files changed

+13
-0
lines changed

packages/thirdweb/src/react/web/ui/prebuilt/Account/blobbie.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { Blobbie, type BlobbieProps } from "../../ConnectWallet/Blobbie.js";
24
import { useAccountContext } from "./provider.js";
35

packages/thirdweb/src/react/web/ui/prebuilt/Account/provider.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use client";
2+
23
import type { Address } from "abitype";
34
import type React from "react";
45
import { createContext, useContext } from "react";

packages/thirdweb/src/react/web/ui/prebuilt/Chain/icon.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { type UseQueryOptions, useQuery } from "@tanstack/react-query";
24
import type { JSX } from "react";
35
import { getChainMetadata } from "../../../../../chains/utils.js";

packages/thirdweb/src/react/web/ui/prebuilt/NFT/media.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { type UseQueryOptions, useQuery } from "@tanstack/react-query";
24
import type { JSX } from "react";
35
import type { ThirdwebContract } from "../../../../../contract/contract.js";

packages/thirdweb/src/react/web/ui/prebuilt/NFT/name.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { type UseQueryOptions, useQuery } from "@tanstack/react-query";
24
import type { JSX } from "react";
35
import type { ThirdwebContract } from "../../../../../contract/contract.js";

packages/thirdweb/src/react/web/ui/prebuilt/NFT/provider.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { createContext, useContext } from "react";
24
import type { ThirdwebContract } from "../../../../../contract/contract.js";
35

packages/thirdweb/src/react/web/ui/prebuilt/Token/icon.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { type UseQueryOptions, useQuery } from "@tanstack/react-query";
24
import type { JSX } from "react";
35
import { getChainMetadata } from "../../../../../chains/utils.js";

0 commit comments

Comments
 (0)