diff --git a/src/components/Notes/Note.tsx b/src/components/Notes/Note.tsx index 3d92fba..00017b0 100644 --- a/src/components/Notes/Note.tsx +++ b/src/components/Notes/Note.tsx @@ -184,7 +184,6 @@ export const Note = ({ ndkEvent }: NoteProps) => { submit( JSON.stringify({ intent: 'repost', - note1: ndkEvent.encode(), data: rawEvent }), { diff --git a/src/components/comment/Comment.tsx b/src/components/comment/Comment.tsx index b2f54fa..a317fad 100644 --- a/src/components/comment/Comment.tsx +++ b/src/components/comment/Comment.tsx @@ -114,7 +114,6 @@ export const Comment = ({ comment }: CommentProps) => { submit( JSON.stringify({ intent: 'repost', - note1: comment.event.encode(), data: rawEvent }), { diff --git a/src/components/comment/CommentsPopup.tsx b/src/components/comment/CommentsPopup.tsx index 1bc691f..f155146 100644 --- a/src/components/comment/CommentsPopup.tsx +++ b/src/components/comment/CommentsPopup.tsx @@ -213,7 +213,6 @@ export const CommentsPopup = ({ title }: CommentsPopupProps) => { submit( JSON.stringify({ intent: 'repost', - note1: event.encode(), data: rawEvent }), { diff --git a/src/pages/feed/action.ts b/src/pages/feed/action.ts index 7fc4fc9..74855f2 100644 --- a/src/pages/feed/action.ts +++ b/src/pages/feed/action.ts @@ -56,11 +56,7 @@ export const feedPostRouteAction = ) case 'repost': - return await handleActionRepost( - ndkContext.ndk, - action.data, - action.note1 - ) + return await handleActionRepost(ndkContext.ndk, action.data) default: throw new Error('Unsupported feed action. Intent missing.') @@ -134,7 +130,7 @@ async function handleActionSubmit( return redirect(getFeedNotePageRoute(note1)) } } -async function handleActionRepost(ndk: NDK, data: NostrEvent, note1: string) { +async function handleActionRepost(ndk: NDK, data: NostrEvent) { const ndkEvent = new NDKEvent(ndk, data) await ndkEvent.sign() @@ -144,6 +140,6 @@ async function handleActionRepost(ndk: NDK, data: NostrEvent, note1: string) { return null } else { toast.success('Note published successfully') - return redirect(getFeedNotePageRoute(note1)) + return null } } diff --git a/src/types/note.ts b/src/types/note.ts index a6c6204..538d489 100644 --- a/src/types/note.ts +++ b/src/types/note.ts @@ -14,7 +14,6 @@ export type NoteAction = } | { intent: 'repost' - note1: string data: NostrEvent }