mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-03-17 21:31:43 +01:00
show replies if there is only one
This commit is contained in:
parent
66b8b6572c
commit
88ae0aad36
@ -9,7 +9,7 @@ export type ThreadItemProps = {
|
||||
};
|
||||
|
||||
export const ThreadPost = ({ post, initShowReplies }: ThreadItemProps) => {
|
||||
const [showReplies, setShowReplies] = useState(!!initShowReplies);
|
||||
const [showReplies, setShowReplies] = useState(initShowReplies ?? post.replies.length === 1);
|
||||
const toggle = () => setShowReplies((v) => !v);
|
||||
|
||||
const numberOfReplies = countReplies(post);
|
||||
|
Loading…
x
Reference in New Issue
Block a user