|
1 | 1 | "use client"; |
2 | | - |
3 | | -import { useThirdwebClient } from "@/constants/thirdweb.client"; |
4 | | -import { useQuery } from "@tanstack/react-query"; |
5 | 2 | import type { ThirdwebContract } from "thirdweb"; |
6 | 3 | import type { ChainMetadata } from "thirdweb/chains"; |
7 | | -import { useActiveAccount } from "thirdweb/react"; |
8 | 4 | import { ErrorPage, LoadingPage } from "../_components/page-skeletons"; |
9 | 5 | import { useContractPageMetadata } from "../_hooks/useContractPageMetadata"; |
10 | 6 | import { ContractOverviewPage } from "./ContractOverviewPage"; |
11 | | -import { |
12 | | - PublishedByUI, |
13 | | - getPublishedByCardProps, |
14 | | -} from "./components/published-by-ui"; |
15 | 7 |
|
16 | 8 | export function ContractOverviewPageClient(props: { |
17 | 9 | contract: ThirdwebContract; |
@@ -44,30 +36,8 @@ export function ContractOverviewPageClient(props: { |
44 | 36 | chainSlug={chainMetadata.slug} |
45 | 37 | isAnalyticsSupported={contractPageMetadata.isAnalyticsSupported} |
46 | 38 | functionSelectors={contractPageMetadata.functionSelectors} |
47 | | - // TODO |
48 | | - publishedBy={<PublishedByClient contract={props.contract} />} |
| 39 | + // TODO - create a fully client rendered version of publishedBy and ContractCard and plug it here |
| 40 | + publishedBy={undefined} |
49 | 41 | /> |
50 | 42 | ); |
51 | 43 | } |
52 | | - |
53 | | -function PublishedByClient(props: { |
54 | | - contract: ThirdwebContract; |
55 | | -}) { |
56 | | - const client = useThirdwebClient(); |
57 | | - const address = useActiveAccount()?.address; |
58 | | - const propsQuery = useQuery({ |
59 | | - queryKey: ["getPublishedByCardProps", props], |
60 | | - queryFn: () => |
61 | | - getPublishedByCardProps({ |
62 | | - address: address || null, |
63 | | - client: client, |
64 | | - contract: props.contract, |
65 | | - }), |
66 | | - }); |
67 | | - |
68 | | - if (!propsQuery.data) { |
69 | | - return null; |
70 | | - } |
71 | | - |
72 | | - return <PublishedByUI {...propsQuery.data} />; |
73 | | -} |
0 commit comments