import { useNostrEvents } from "nostr-react"; import { nip19 } from 'nostr-tools' import Linkify from 'react-linkify'; type NostrEvent = { "content": string, "created_at": number, id?: string } function Note({ e }: { e: NostrEvent }) { const date = new Date(e.created_at * 1000); const linkRoot = "https://snort.social/e/"; let noteId; if (e.id) { noteId = nip19.noteEncode(e.id) } return (
{/*

{JSON.stringify(e, null, 2)}

*/}

{e.content ?? e.content}

{date.toLocaleString()}
) } export default function Notes() { const { events } = useNostrEvents({ filter: { authors: [ "0d6c8388dcb049b8dd4fc8d3d8c3bb93de3da90ba828e4f09c8ad0f346488a33", ], since: 0, kinds: [1], }, }); return ( ) }