From f11fe2d3493b0b3184b8d0d60f40ab63cc10bd5c Mon Sep 17 00:00:00 2001 From: Ren Amamiya <123083837+reyamir@users.noreply.github.com> Date: Sat, 20 May 2023 21:19:22 +0700 Subject: [PATCH] use nip05 as display name --- src/app/note/components/base.tsx | 2 +- src/app/note/components/parent.tsx | 4 ++-- src/app/note/components/quoteRepost.tsx | 2 +- src/app/note/components/replies/item.tsx | 2 +- src/app/note/components/rootNote.tsx | 4 ++-- src/app/note/components/user/default.tsx | 27 ++++++++++-------------- src/app/note/components/user/reply.tsx | 6 +++--- src/app/note/components/user/repost.tsx | 18 +++++++--------- 8 files changed, 29 insertions(+), 36 deletions(-) diff --git a/src/app/note/components/base.tsx b/src/app/note/components/base.tsx index c4e3c8b1..a2b2e19c 100644 --- a/src/app/note/components/base.tsx +++ b/src/app/note/components/base.tsx @@ -29,7 +29,7 @@ export function NoteBase({ event }: { event: any }) { )}
-
+
{event.kind === 1 && } {event.kind === 1063 && } diff --git a/src/app/note/components/parent.tsx b/src/app/note/components/parent.tsx index 1a62c7ac..fff8dfe0 100644 --- a/src/app/note/components/parent.tsx +++ b/src/app/note/components/parent.tsx @@ -47,11 +47,11 @@ export const NoteParent = memo(function NoteParent({ id }: { id: string }) { return (
-
+
{data ? ( <> -
+
{kind1 && } {kind1063 && } diff --git a/src/app/note/components/quoteRepost.tsx b/src/app/note/components/quoteRepost.tsx index 27e96504..dfdf4401 100644 --- a/src/app/note/components/quoteRepost.tsx +++ b/src/app/note/components/quoteRepost.tsx @@ -14,7 +14,7 @@ export function NoteQuoteRepost({ event }: { event: any }) { >
-
+
diff --git a/src/app/note/components/replies/item.tsx b/src/app/note/components/replies/item.tsx index 9fdc5e3e..6ac5ce4d 100644 --- a/src/app/note/components/replies/item.tsx +++ b/src/app/note/components/replies/item.tsx @@ -10,7 +10,7 @@ export default function Reply({ data }: { data: any }) {
-
+
diff --git a/src/app/note/components/rootNote.tsx b/src/app/note/components/rootNote.tsx index a35e8c34..36fe8dfa 100644 --- a/src/app/note/components/rootNote.tsx +++ b/src/app/note/components/rootNote.tsx @@ -81,7 +81,7 @@ export const RootNote = memo(function RootNote({ pubkey={parseFallback.pubkey} time={parseFallback.created_at} /> -
+
-
+
{kind1 && } {kind1063 && } diff --git a/src/app/note/components/user/default.tsx b/src/app/note/components/user/default.tsx index f69a2011..8b9e857a 100644 --- a/src/app/note/components/user/default.tsx +++ b/src/app/note/components/user/default.tsx @@ -19,29 +19,24 @@ export function NoteDefaultUser({ const { user } = useProfile(pubkey); return ( - - + + {pubkey} -
-
-
- {user?.display_name || user?.name || ( -
- )} -
-
- {user?.nip05 || shortenKey(pubkey)} - - {dayjs().to(dayjs.unix(time), true)} -
-
+
+
+ {user?.nip05 || user?.name || shortenKey(pubkey)} +
+ · + + {dayjs().to(dayjs.unix(time), true)} +
-
+
{pubkey}
- {user?.display_name || user?.name || shortenKey(pubkey)} + {user?.nip05 || user?.name || shortenKey(pubkey)} · diff --git a/src/app/note/components/user/repost.tsx b/src/app/note/components/user/repost.tsx index cdbab9c7..cda2237e 100644 --- a/src/app/note/components/user/repost.tsx +++ b/src/app/note/components/user/repost.tsx @@ -19,28 +19,26 @@ export function NoteRepostUser({ const { user } = useProfile(pubkey); return ( - - + + {pubkey} -
-
- {user?.display_name || user?.name || ( -
- )} +
+
+ {user?.nip05 || user?.name || shortenKey(pubkey)} {" "} reposted
- · - + · + {dayjs().to(dayjs.unix(time), true)}