import { Component, Switch, Match } from 'solid-js'; import { npubEncode } from 'nostr-tools/nip19'; import useConfig from '@/nostr/useConfig'; import useProfile from '@/nostr/useProfile'; type UserNameDisplayProps = { pubkey: string; }; const UserNameDisplay: Component = (props) => { const { config } = useConfig(); const { profile } = useProfile(() => ({ relayUrls: config().relayUrls, pubkey: props.pubkey, })); return ( 0}>{profile()?.display_name} 0}>@{profile()?.name} ); }; export default UserNameDisplay;