mirror of
https://github.com/aljazceru/rabbit.git
synced 2025-12-18 14:34:25 +01:00
update
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Component, Switch, Match } from 'solid-js';
|
||||
import { npubEncode } from 'nostr-tools/nip19';
|
||||
|
||||
import useConfig from '@/nostr/useConfig';
|
||||
import useProfile from '@/nostr/useProfile';
|
||||
@@ -15,7 +16,7 @@ const UserNameDisplay: Component<UserNameDisplayProps> = (props) => {
|
||||
}));
|
||||
|
||||
return (
|
||||
<Switch fallback={`@${props.pubkey}`}>
|
||||
<Switch fallback={npubEncode(props.pubkey)}>
|
||||
<Match when={(profile()?.display_name?.length ?? 0) > 0}>{profile()?.display_name}</Match>
|
||||
<Match when={(profile()?.name?.length ?? 0) > 0}>@{profile()?.name}</Match>
|
||||
</Switch>
|
||||
|
||||
Reference in New Issue
Block a user