note options constant param

This commit is contained in:
Martti Malmi
2024-01-08 15:42:25 +02:00
parent a20c8dbbf4
commit d3bc1b1c1d
9 changed files with 182 additions and 175 deletions

View File

@ -4,6 +4,11 @@ import { useEventFeed } from "@snort/system-react";
import Note from "@/Components/Event/EventComponent";
import PageSpinner from "@/Components/PageSpinner";
const options = {
showFooter: false,
truncate: true,
};
export default function NoteQuote({ link, depth }: { link: NostrLink; depth?: number }) {
const ev = useEventFeed(link);
if (!ev.data)
@ -12,15 +17,5 @@ export default function NoteQuote({ link, depth }: { link: NostrLink; depth?: nu
<PageSpinner />
</div>
);
return (
<Note
data={ev.data}
className="note-quote"
depth={(depth ?? 0) + 1}
options={{
showFooter: false,
truncate: true,
}}
/>
);
return <Note data={ev.data} className="note-quote" depth={(depth ?? 0) + 1} options={options} />;
}