wip: migrate to ark

This commit is contained in:
reya
2023-12-08 09:32:48 +07:00
parent 5f90bd0d22
commit 68886ad584
26 changed files with 441 additions and 349 deletions
+3 -3
View File
@@ -4,7 +4,7 @@ import { useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { toast } from 'sonner';
import { useNDK } from '@libs/ndk/provider';
import { useArk } from '@libs/ark';
import { ReactionIcon } from '@shared/icons';
@@ -35,7 +35,7 @@ export function NoteReaction({ event }: { event: NDKEvent }) {
const [open, setOpen] = useState(false);
const [reaction, setReaction] = useState<string | null>(null);
const { ndk } = useNDK();
const { ark } = useArk();
const navigate = useNavigate();
const getReactionImage = (content: string) => {
@@ -45,7 +45,7 @@ export function NoteReaction({ event }: { event: NDKEvent }) {
const react = async (content: string) => {
try {
if (!ndk.signer) return navigate('/new/privkey');
if (!ark.readyToSign) return navigate('/new/privkey');
setReaction(content);