Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,42 +44,13 @@ export async function generateMetadata(props: PageProps): Promise<Metadata> {
return notFound();
}

const publisherProfile = await fetchPublisherProfile(
resolvedInfo.address,
).catch(() => null);

if (!publisherProfile) {
return notFound();
}

const displayName = shortenIfAddress(
resolvedInfo.ensName || resolvedInfo.address,
).replace("deployer.thirdweb.eth", "thirdweb.eth");

// TODO - move this to opengraph-image.tsx
// this is not working even on prod
// const ogImageLink = ProfileOG.toUrl({
// displayName,
// bio: publisherProfile.bio,
// avatar: publisherProfile.avatar,
// });

return {
title: displayName,
description: `Visit ${displayName}'s profile. See their published contracts and deploy them in one click.`,
// openGraph: {
// title: displayName,
// images: ogImageLink
// ? [
// {
// url: ogImageLink.toString(),
// alt: `${displayName}'s profile on thirdweb.com`,
// width: 1200,
// height: 630,
// },
// ]
// : undefined,
// },
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ export const PublisherAvatar: React.FC<PublisherAvatarProps> = ({
client,
});

if (
!(isPending || ensQuery.isPending || publisherProfile.isPending) &&
!publisherImageUrl
) {
return null;
}

return (
<MaskedAvatar
isPending={isPending || ensQuery.isPending || publisherProfile.isPending}
Expand Down
Loading