fix: Share popover incorrectly displays draft as publicly shared when parent document is (#2982)
closes #2978
This commit is contained in:
@@ -20,7 +20,8 @@ function ShareButton({ document }: Props) {
|
||||
const share = shares.getByDocumentId(document.id);
|
||||
const sharedParent = shares.getByDocumentParents(document.id);
|
||||
const isPubliclyShared =
|
||||
(share && share.published) || (sharedParent && sharedParent.published);
|
||||
(share && share.published) ||
|
||||
(sharedParent && sharedParent.published && !document.isDraft);
|
||||
|
||||
const popover = usePopoverState({
|
||||
gutter: 0,
|
||||
|
||||
Reference in New Issue
Block a user