feat: show replies count

This commit is contained in:
2023-10-13 11:22:58 +01:00
parent 9b66b7b1da
commit ddb8e623f4
4 changed files with 19 additions and 3 deletions

View File

@ -23,6 +23,7 @@ import Reactions from "./Reactions";
import HiddenNote from "./HiddenNote";
import { NoteProps } from "./Note";
import { useEventReactions } from "Hooks/useEventReactions";
import { chainKey } from "Hooks/useThreadContext";
export function NoteInner(props: NoteProps) {
const { data: ev, related, highlight, options: opt, ignoreModeration = false, className } = props;
@ -306,7 +307,15 @@ export function NoteInner(props: NoteProps) {
</div>
)}
</div>
{options.showFooter && <NoteFooter ev={ev} positive={reactions.positive} reposts={reposts} zaps={zaps} />}
{options.showFooter && (
<NoteFooter
ev={ev}
positive={reactions.positive}
reposts={reposts}
zaps={zaps}
replies={props.threadChains?.get(chainKey(ev))?.length}
/>
)}
<Reactions
show={showReactions}
setShow={setShowReactions}