File tree Expand file tree Collapse file tree 2 files changed +7
-29
lines changed
app/(dashboard)/profile/[addressOrEns]
components/contract-components/publisher Expand file tree Collapse file tree 2 files changed +7
-29
lines changed Original file line number Diff line number Diff line change @@ -44,42 +44,13 @@ export async function generateMetadata(props: PageProps): Promise<Metadata> {
4444 return notFound ( ) ;
4545 }
4646
47- const publisherProfile = await fetchPublisherProfile (
48- resolvedInfo . address ,
49- ) . catch ( ( ) => null ) ;
50-
51- if ( ! publisherProfile ) {
52- return notFound ( ) ;
53- }
54-
5547 const displayName = shortenIfAddress (
5648 resolvedInfo . ensName || resolvedInfo . address ,
5749 ) . replace ( "deployer.thirdweb.eth" , "thirdweb.eth" ) ;
5850
59- // TODO - move this to opengraph-image.tsx
60- // this is not working even on prod
61- // const ogImageLink = ProfileOG.toUrl({
62- // displayName,
63- // bio: publisherProfile.bio,
64- // avatar: publisherProfile.avatar,
65- // });
66-
6751 return {
6852 title : displayName ,
6953 description : `Visit ${ displayName } 's profile. See their published contracts and deploy them in one click.` ,
70- // openGraph: {
71- // title: displayName,
72- // images: ogImageLink
73- // ? [
74- // {
75- // url: ogImageLink.toString(),
76- // alt: `${displayName}'s profile on thirdweb.com`,
77- // width: 1200,
78- // height: 630,
79- // },
80- // ]
81- // : undefined,
82- // },
8354 } ;
8455}
8556
Original file line number Diff line number Diff line change @@ -28,6 +28,13 @@ export const PublisherAvatar: React.FC<PublisherAvatarProps> = ({
2828 client,
2929 } ) ;
3030
31+ if (
32+ ! ( isPending || ensQuery . isPending || publisherProfile . isPending ) &&
33+ ! publisherImageUrl
34+ ) {
35+ return null ;
36+ }
37+
3138 return (
3239 < MaskedAvatar
3340 isPending = { isPending || ensQuery . isPending || publisherProfile . isPending }
You can’t perform that action at this time.
0 commit comments