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
24 changes: 12 additions & 12 deletions apps/dashboard/src/@/components/blocks/wallet-address.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,11 @@ import { Check, Copy, ExternalLinkIcon } from "lucide-react";
import { useMemo } from "react";
import { type ThirdwebClient, isAddress } from "thirdweb";
import { ZERO_ADDRESS } from "thirdweb";
import {
Blobbie,
MediaRenderer,
type SocialProfile,
useSocialProfiles,
} from "thirdweb/react";
import { Blobbie, type SocialProfile, useSocialProfiles } from "thirdweb/react";
import { cn } from "../../lib/utils";
import { Badge } from "../ui/badge";
import { Button } from "../ui/button";
import { Img } from "./Img";

export function WalletAddress(props: {
address: string | undefined;
Expand Down Expand Up @@ -182,14 +178,18 @@ function WalletAvatar(props: {
profile.avatar.startsWith("ipfs")),
)?.avatar;
}, [props.profiles]);

const resolvedAvatarSrc = avatar
? resolveSchemeWithErrorHandler({
client: props.thirdwebClient,
uri: avatar,
})
: undefined;

return (
<div className="size-6 overflow-hidden rounded-full">
{avatar ? (
<MediaRenderer
client={props.thirdwebClient}
src={avatar}
className="size-6"
/>
{resolvedAvatarSrc ? (
<Img src={resolvedAvatarSrc} className="size-6 object-cover" />
) : (
<Blobbie address={props.address} size={24} />
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function ProfileHeader(props: {
<div className="flex w-full flex-col items-center justify-between gap-4 border-border border-b pb-6 md:flex-row">
<div className="flex w-full items-center gap-4">
<AccountAvatar
className="size-20 rounded-full"
className="size-20 rounded-full object-cover"
loadingComponent={<Skeleton className="size-20 rounded-full" />}
fallbackComponent={
<AccountBlobbie className="size-20 rounded-full" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const PublisherHeader: React.FC<PublisherHeaderProps> = ({
<AccountBlobbie className="size-14 rounded-full" />
}
loadingComponent={<Skeleton className="size-14 rounded-full" />}
className="size-14 rounded-full"
className="size-14 rounded-full object-cover"
/>
</Link>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const ContractPublisher: React.FC<ContractPublisherProps> = ({
<AccountAvatar
fallbackComponent={<AccountBlobbie className="size-5 rounded-full" />}
loadingComponent={<Skeleton className="size-5 rounded-full" />}
className="size-5 rounded-full"
className="size-5 rounded-full object-cover"
/>

<AccountName
Expand Down
Loading