Change comment sidebar to per-document persistence, closes #4985

This commit is contained in:
Tom Moor
2023-03-05 16:59:29 -05:00
parent 69c7bf6100
commit b795c992fe
6 changed files with 30 additions and 16 deletions

View File

@@ -55,7 +55,10 @@ function TitleDocumentMeta({ to, isDraft, document, ...rest }: Props) {
{team?.getPreference(TeamPreference.Commenting) && (
<>
&nbsp;&nbsp;
<CommentLink to={documentUrl(document)} onClick={ui.toggleComments}>
<CommentLink
to={documentUrl(document)}
onClick={() => ui.toggleComments(document.id)}
>
<CommentIcon color="currentColor" size={18} />
{commentsCount
? t("{{ count }} comment", { count: commentsCount })