feat: long form deck modal

This commit is contained in:
2023-10-16 13:45:51 +01:00
parent d9fc4f37b0
commit e378a53b21
10 changed files with 207 additions and 46 deletions

View File

@ -3,9 +3,12 @@ import { useArticles } from "Feed/ArticlesFeed";
import { orderDescending } from "SnortUtils";
import Note from "../Event/Note";
import { useReactions } from "Feed/Reactions";
import { useContext } from "react";
import { DeckContext } from "Pages/DeckLayout";
export default function Articles() {
const data = useArticles();
const deck = useContext(DeckContext);
const related = useReactions("articles:reactions", data.data?.map(v => NostrLink.fromEvent(v)) ?? []);
return (
@ -18,6 +21,9 @@ export default function Articles() {
options={{
longFormPreview: true,
}}
onClick={ev => {
deck?.setArticle(ev);
}}
/>
))}
</>