wip: migrate to ark

This commit is contained in:
2023-12-07 18:09:00 +07:00
parent 95124e5ded
commit 7507cd9ba1
29 changed files with 206 additions and 454 deletions

View File

@@ -2,20 +2,21 @@ import { NDKEvent } from '@nostr-dev-kit/ndk';
import { memo } from 'react';
import { twMerge } from 'tailwind-merge';
import { useArk } from '@libs/ark';
import { ChildNote, NoteActions } from '@shared/notes';
import { User } from '@shared/user';
import { WIDGET_KIND } from '@utils/constants';
import { useNostr } from '@utils/hooks/useNostr';
import { useRichContent } from '@utils/hooks/useRichContent';
import { useWidget } from '@utils/hooks/useWidget';
export function TextNote({ event, className }: { event: NDKEvent; className?: string }) {
const { parsedContent } = useRichContent(event.content);
const { addWidget } = useWidget();
const { getEventThread } = useNostr();
const { ark } = useArk();
const thread = getEventThread(event.tags);
const thread = ark.getEventThread({ tags: event.tags });
return (
<div className={twMerge('mb-3 h-min w-full px-3', className)}>