import { useFootnoteContext } from "./FootnoteContext"; import { FootnoteEditor } from "./FootnoteEditor"; import { useReplicache } from "src/replicache"; import { useEntitySetContext } from "components/EntitySetProvider"; import { deleteFootnoteFromBlock } from "./deleteFootnoteFromBlock"; import { FootnoteSectionLayout } from "./FootnoteItemLayout"; export function FootnoteSection(props: { hiddenOnDesktop?: boolean }) { let { footnotes } = useFootnoteContext(); let { permissions } = useEntitySetContext(); let rep = useReplicache(); if (footnotes.length === 0) return null; return ( {footnotes.map((fn) => ( { deleteFootnoteFromBlock( fn.footnoteEntityID, fn.blockID, rep.rep, ); } : undefined } /> ))} ); }