Display domain on share button
This commit is contained in:
@@ -21,6 +21,7 @@ function ShareButton({ document }: Props) {
|
|||||||
const team = useCurrentTeam();
|
const team = useCurrentTeam();
|
||||||
const share = shares.getByDocumentId(document.id);
|
const share = shares.getByDocumentId(document.id);
|
||||||
const sharedParent = shares.getByDocumentParents(document.id);
|
const sharedParent = shares.getByDocumentParents(document.id);
|
||||||
|
const domain = share?.domain || sharedParent?.domain;
|
||||||
const isPubliclyShared =
|
const isPubliclyShared =
|
||||||
team.sharing &&
|
team.sharing &&
|
||||||
(share?.published || (sharedParent?.published && !document.isDraft));
|
(share?.published || (sharedParent?.published && !document.isDraft));
|
||||||
@@ -54,7 +55,7 @@ function ShareButton({ document }: Props) {
|
|||||||
neutral
|
neutral
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{t("Share")}
|
{t("Share")} {domain && <>· {domain}</>}
|
||||||
</Button>
|
</Button>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user