add new private key screen

This commit is contained in:
2023-11-17 09:24:21 +07:00
parent 21574023db
commit 2794c78ee1
17 changed files with 233 additions and 84 deletions

View File

@@ -1,5 +1,6 @@
import { NDKEvent, NDKKind } from '@nostr-dev-kit/ndk';
import { useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { toast } from 'sonner';
import { useNDK } from '@libs/ndk/provider';
@@ -9,12 +10,15 @@ import { ReplyMediaUploader } from '@shared/notes';
export function NoteReplyForm({ rootEvent }: { rootEvent: NDKEvent }) {
const { ndk } = useNDK();
const navigate = useNavigate();
const [value, setValue] = useState('');
const [loading, setLoading] = useState(false);
const submit = async () => {
try {
if (!ndk.signer) return navigate('/new/privkey');
setLoading(true);
const event = new NDKEvent(ndk);