/** @jsx h */ import { Fragment, h } from "https://esm.sh/preact@10.11.3"; import { tw } from "https://esm.sh/twind@0.16.16"; import { Avatar } from "./components/avatar.tsx"; import { CloseIcon, HomeIcon, KeyIcon, UserIcon } from "./icons/mod.tsx"; import { PublicKey } from "https://raw.githubusercontent.com/BlowaterNostr/nostr.ts/main/key.ts"; import { ProfileData } from "../features/profile.ts"; import { IconButtonClass } from "./components/tw.ts"; import { EventEmitter } from "../event-bus.ts"; import { DirectMessagePanelUpdate } from "./message-panel.tsx"; type UserDetailProps = { targetUserProfile: ProfileData; pubkey: PublicKey; eventEmitter: EventEmitter; }; export function UserDetail(props: UserDetailProps) { return (

{props.targetUserProfile.name || props.pubkey.bech32()}

{props.pubkey.bech32()}

{props.targetUserProfile.about ? (

{props.targetUserProfile.about}

) : undefined} {props.targetUserProfile.website ? (

{props.targetUserProfile.website ? props.targetUserProfile.website : "There is no website."}

) : undefined}
); }