From 37668393f191d692754ca8a007485c0f9db6b991 Mon Sep 17 00:00:00 2001 From: Ren Amamiya <123083837+reyamir@users.noreply.github.com> Date: Sat, 2 Sep 2023 17:28:05 +0700 Subject: [PATCH] expt: disable note metadata --- src/app/notifications/components/simpleNote.tsx | 2 +- src/shared/notes/actions.tsx | 2 +- src/shared/notes/kinds/repost.tsx | 4 +--- src/shared/notes/metadata.tsx | 2 +- src/shared/notes/wrapper.tsx | 7 ++----- 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/app/notifications/components/simpleNote.tsx b/src/app/notifications/components/simpleNote.tsx index 0f681767..badb01d4 100644 --- a/src/app/notifications/components/simpleNote.tsx +++ b/src/app/notifications/components/simpleNote.tsx @@ -18,7 +18,7 @@ export const SimpleNote = memo(function SimpleNote({ id }: { id: string }) { const openThread = (event, thread: string) => { const selection = window.getSelection(); if (selection.toString().length === 0) { - setWidget(db, { kind: WidgetKinds.thread, title: 'Thread', content: thread }); + setWidget(db, { kind: WidgetKinds.local.thread, title: 'Thread', content: thread }); } else { event.stopPropagation(); } diff --git a/src/shared/notes/actions.tsx b/src/shared/notes/actions.tsx index 599e774f..c9bdb62f 100644 --- a/src/shared/notes/actions.tsx +++ b/src/shared/notes/actions.tsx @@ -61,7 +61,7 @@ export function NoteActions({ type="button" onClick={() => setWidget(db, { - kind: WidgetKinds.thread, + kind: WidgetKinds.local.thread, title: 'Thread', content: id, }) diff --git a/src/shared/notes/kinds/repost.tsx b/src/shared/notes/kinds/repost.tsx index 142c779c..c2b0dc3e 100644 --- a/src/shared/notes/kinds/repost.tsx +++ b/src/shared/notes/kinds/repost.tsx @@ -5,7 +5,6 @@ import { ArticleNote, FileNote, NoteActions, - NoteMetadata, NoteSkeleton, RepostUser, TextNote, @@ -62,7 +61,7 @@ export function Repost({ event }: { event: NDKEvent }) { return (
-
+
@@ -75,7 +74,6 @@ export function Repost({ event }: { event: NDKEvent }) {
-
diff --git a/src/shared/notes/metadata.tsx b/src/shared/notes/metadata.tsx index a1df35b4..4d8ca5d9 100644 --- a/src/shared/notes/metadata.tsx +++ b/src/shared/notes/metadata.tsx @@ -95,7 +95,7 @@ export function NoteMetadata({ id }: { id: string }) { type="button" onClick={() => setWidget(db, { - kind: WidgetKinds.thread, + kind: WidgetKinds.local.thread, title: 'Thread', content: id, }) diff --git a/src/shared/notes/wrapper.tsx b/src/shared/notes/wrapper.tsx index b7278a60..4fc8b8c2 100644 --- a/src/shared/notes/wrapper.tsx +++ b/src/shared/notes/wrapper.tsx @@ -1,26 +1,24 @@ import { NDKEvent } from '@nostr-dev-kit/ndk'; import { ReactNode } from 'react'; -import { ChildNote, NoteActions, NoteMetadata } from '@shared/notes'; +import { ChildNote, NoteActions } from '@shared/notes'; import { User } from '@shared/user'; export function NoteWrapper({ event, children, - meta = true, root, reply, }: { event: NDKEvent; children: ReactNode; repost?: boolean; - meta?: boolean; root?: string; reply?: string; }) { return (
-
+
{root && }
{reply && }
@@ -32,7 +30,6 @@ export function NoteWrapper({
- {meta ? :
}