wip: fully migrate to ark

This commit is contained in:
reya
2023-12-08 12:39:15 +07:00
parent 6f5ea1229d
commit e507187044
24 changed files with 141 additions and 2240 deletions
+1 -4
View File
@@ -12,16 +12,13 @@ import { useArk } from '@libs/ark';
import { LoaderIcon } from '@shared/icons';
import { User } from '@shared/user';
import { useNostr } from '@utils/hooks/useNostr';
export function ChatScreen() {
const { ark } = useArk();
const { pubkey } = useParams();
const { fetchNIP04Messages } = useNostr();
const { status, data } = useQuery({
queryKey: ['nip04-dm', pubkey],
queryFn: async () => {
return await fetchNIP04Messages(pubkey);
return await ark.getAllMessagesByPubkey({ pubkey });
},
refetchOnWindowFocus: false,
});