updated thread page

This commit is contained in:
Ren Amamiya
2023-03-26 15:41:44 +07:00
parent 28215dbd5f
commit fd2ddc4d2b
4 changed files with 93 additions and 15 deletions

View File

@@ -8,6 +8,7 @@ import { relaysAtom } from '@stores/relays';
import { dateToUnix } from '@utils/getDate';
import { ImageIcon, ResetIcon } from '@radix-ui/react-icons';
import { sendNotification } from '@tauri-apps/api/notification';
import { useAtom, useAtomValue } from 'jotai';
import { useResetAtom } from 'jotai/utils';
import { getEventHash, signEvent } from 'nostr-tools';
@@ -35,8 +36,12 @@ export default function FormBase() {
event.id = getEventHash(event);
event.sig = signEvent(event, privkey);
// publish note
pool.publish(event, relays);
resetValue;
// reset form
resetValue();
// send notification
sendNotification('Note has been published successfully');
};
return (