/** @jsx h */ import { h } from "https://esm.sh/preact@10.17.1"; import { tw } from "https://esm.sh/twind@0.16.16"; import { Avatar } from "./components/avatar.tsx"; import { PublicKey } from "../lib/nostr-ts/key.ts"; import { ProfileData } from "../features/profile.ts"; import { emitFunc } from "../event-bus.ts"; import { DirectMessagePanelUpdate } from "./message-panel.tsx"; import { HomeIcon } from "./icons/home-icon.tsx"; import { KeyIcon } from "./icons/key-icon.tsx"; import { UserIcon } from "./icons/user-icon.tsx"; type UserDetailProps = { targetUserProfile: ProfileData; pubkey: PublicKey; emit: emitFunc; }; export function UserDetail(props: UserDetailProps) { return (

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

{props.pubkey.bech32()}

{props.pubkey.hex}

{props.targetUserProfile.about ? (

{props.targetUserProfile.about}

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

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

) : undefined}
); }