Skip to content

Commit f0e0ddd

Browse files
committed
Fix error thrown from PublishedBy card on localhost chain
1 parent e01971d commit f0e0ddd

File tree

1 file changed

+2
-32
lines changed

1 file changed

+2
-32
lines changed
Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
"use client";
2-
3-
import { useThirdwebClient } from "@/constants/thirdweb.client";
4-
import { useQuery } from "@tanstack/react-query";
52
import type { ThirdwebContract } from "thirdweb";
63
import type { ChainMetadata } from "thirdweb/chains";
7-
import { useActiveAccount } from "thirdweb/react";
84
import { ErrorPage, LoadingPage } from "../_components/page-skeletons";
95
import { useContractPageMetadata } from "../_hooks/useContractPageMetadata";
106
import { ContractOverviewPage } from "./ContractOverviewPage";
11-
import {
12-
PublishedByUI,
13-
getPublishedByCardProps,
14-
} from "./components/published-by-ui";
157

168
export function ContractOverviewPageClient(props: {
179
contract: ThirdwebContract;
@@ -44,30 +36,8 @@ export function ContractOverviewPageClient(props: {
4436
chainSlug={chainMetadata.slug}
4537
isAnalyticsSupported={contractPageMetadata.isAnalyticsSupported}
4638
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}
4941
/>
5042
);
5143
}
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

Comments
 (0)