fix: only use thumb if non empty string

This commit is contained in:
Alejandro Gomez 2023-03-05 23:27:13 +01:00
parent debefa0873
commit dde729a1d2
No known key found for this signature in database
GPG Key ID: 4DF39E566658C817
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ export default function BadgeList({ badges }: { badges: TaggedRawEvent[] }) {
pubkey: b.pubkey,
name,
description,
img: thumb || image,
img: thumb?.length > 0 ? thumb : image,
};
});
return (

View File

@ -79,7 +79,6 @@ export default function ProfilePage() {
const website_url =
user?.website && !user.website.startsWith("http") ? "https://" + user.website : user?.website || "";
// feeds
const badges = useProfileBadges(id);
const { blocked } = useModeration();
const { notes: pinned, related: pinRelated } = usePinnedFeed(id);
const { notes: bookmarks, related: bookmarkRelated } = useBookmarkFeed(id);
@ -89,6 +88,7 @@ export default function ProfilePage() {
const followers = useFollowersFeed(id);
const follows = useFollowsFeed(id);
const muted = useMutedFeed(id);
const badges = useProfileBadges(id);
// tabs
const ProfileTab = {
Notes: { text: formatMessage(messages.Notes), value: NOTES },