Skip to content

Commit dce2ca0

Browse files
committed
Fix MaskedAvatar component stuck in loading state (#4937)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR primarily focuses on making minor adjustments to the text content in the `ambassadors.tsx` file and refining the handling of props in the `MaskedAvatar` component within `masked-avatar/index.tsx`. ### Detailed summary - In `ambassadors.tsx`, added a space after "Meet the". - In `masked-avatar/index.tsx`: - Changed `skeletonData` from `false` to `undefined`. - Changed `loadedData` from `isPending` to `src`. - Updated the render prop to use `v` instead of `src`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent c6fbd60 commit dce2ca0

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

apps/dashboard/src/pages/community/ambassadors.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ const Ambassadors: ThirdwebNextPage = () => {
577577
align={{ base: "initial", md: "center" }}
578578
>
579579
<Heading as="h2" size="display.md" mb={4} textAlign="center">
580-
Meet the
580+
Meet the{" "}
581581
<Heading
582582
size="display.md"
583583
as="span"

apps/dashboard/src/tw-components/masked-avatar/index.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export const MaskedAvatar: React.FC<MaskedAvatarProps> = ({
1414
src,
1515
alt,
1616
boxSize = 12,
17-
isPending,
1817
className,
1918
}) => {
2019
return (
@@ -26,11 +25,11 @@ export const MaskedAvatar: React.FC<MaskedAvatarProps> = ({
2625
mask: `url("${hexagon.src}")`,
2726
maskSize: "cover",
2827
}}
29-
skeletonData={false}
30-
loadedData={isPending}
31-
render={() => (
28+
skeletonData={undefined}
29+
loadedData={src}
30+
render={(v) => (
3231
// eslint-disable-next-line @next/next/no-img-element
33-
<img className="object-cover" src={src} alt={alt || ""} />
32+
<img className="object-cover" src={v} alt={alt || ""} />
3433
)}
3534
/>
3635
);

0 commit comments

Comments
 (0)