diff --git a/src/element/Avatar.tsx b/src/element/Avatar.tsx index a08e7877..21e4b6c8 100644 --- a/src/element/Avatar.tsx +++ b/src/element/Avatar.tsx @@ -7,7 +7,7 @@ import { CSSProperties } from "react"; import type { UserMetadata } from "../nostr"; -const Avatar = ({ user, ...rest }: { user?: UserMetadata }) => { +const Avatar = ({ user, ...rest }: { user?: UserMetadata, onClick?: () => void}) => { const avatarUrl = (user?.picture?.length ?? 0) === 0 ? Nostrich : user?.picture const backgroundImage = `url(${avatarUrl})` const domain = user?.nip05 && user.nip05.split('@')[1] diff --git a/src/element/Text.tsx b/src/element/Text.tsx index d7bc1011..0f6339d1 100644 --- a/src/element/Text.tsx +++ b/src/element/Text.tsx @@ -150,7 +150,7 @@ function transformLi({ body, tags, users }: TextFragment) { function transformParagraph({ body, tags, users }: TextFragment) { const fragments = transformText({ body, tags, users }) - if (fragments.every(f => typeof f === 'string') && fragments.length > 1) { + if (fragments.every(f => typeof f === 'string')) { return

{fragments}

} return <>{fragments} diff --git a/src/pages/ProfilePage.tsx b/src/pages/ProfilePage.tsx index 651a6ba2..e640b541 100644 --- a/src/pages/ProfilePage.tsx +++ b/src/pages/ProfilePage.tsx @@ -38,7 +38,7 @@ export default function ProfilePage() { const isMe = loginPubKey === id; const [showLnQr, setShowLnQr] = useState(false); const [tab, setTab] = useState(ProfileTab.Notes); - const about = Text({ content: user?.about }) + const about = Text({ content: user?.about || '', tags: [], users: new Map() }) useEffect(() => { setTab(ProfileTab.Notes);