From aa2a9851c3e3e4e7f7d7455f760c59ae8bb241f0 Mon Sep 17 00:00:00 2001 From: Ren Amamiya <123083837+reyamir@users.noreply.github.com> Date: Mon, 7 Aug 2023 09:07:53 +0700 Subject: [PATCH] small fixes --- src/app/events/index.tsx | 4 ++-- src/app/space/components/blocks/thread.tsx | 8 ++++++-- src/shared/notes/actions/more.tsx | 7 ++++++- src/shared/user.tsx | 2 +- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/app/events/index.tsx b/src/app/events/index.tsx index 7538c04f..48db0500 100644 --- a/src/app/events/index.tsx +++ b/src/app/events/index.tsx @@ -35,8 +35,8 @@ export function EventScreen() {
- - + +
diff --git a/src/app/space/components/blocks/thread.tsx b/src/app/space/components/blocks/thread.tsx index 32abfb1f..ded82fb7 100644 --- a/src/app/space/components/blocks/thread.tsx +++ b/src/app/space/components/blocks/thread.tsx @@ -39,8 +39,12 @@ export function ThreadBlock({ params }: { params: Block }) {
- - + +
diff --git a/src/shared/notes/actions/more.tsx b/src/shared/notes/actions/more.tsx index e0ebf1c7..6e352139 100644 --- a/src/shared/notes/actions/more.tsx +++ b/src/shared/notes/actions/more.tsx @@ -3,13 +3,17 @@ import * as Tooltip from '@radix-ui/react-tooltip'; import { writeText } from '@tauri-apps/plugin-clipboard-manager'; import { nip19 } from 'nostr-tools'; import { EventPointer } from 'nostr-tools/lib/nip19'; +import { useState } from 'react'; import { Link } from 'react-router-dom'; import { HorizontalDotsIcon } from '@shared/icons'; export function MoreActions({ id, pubkey }: { id: string; pubkey: string }) { + const [open, setOpen] = useState(false); + const copyID = async () => { await writeText(nip19.neventEncode({ id: id, author: pubkey } as EventPointer)); + setOpen(false); }; const copyLink = async () => { @@ -17,10 +21,11 @@ export function MoreActions({ id, pubkey }: { id: string; pubkey: string }) { 'https://nostr.com/' + nip19.neventEncode({ id: id, author: pubkey } as EventPointer) ); + setOpen(false); }; return ( - + diff --git a/src/shared/user.tsx b/src/shared/user.tsx index 20cc0bc1..005efc5d 100644 --- a/src/shared/user.tsx +++ b/src/shared/user.tsx @@ -52,7 +52,7 @@ export function User({