fix: Guard new doc button on collections, supercedes #8400

This commit is contained in:
Tom Moor committed 2025-02-13 19:30:46 -05:00
1 parent 3f8fb66be1
commit edd413fba3
1 file changed
+12 -10
@@ -147,16 +147,18 @@ const CollectionLink: React.FC<Props> = ({
!isEditing &&
!isDraggingAnyCollection && (
<Fade>
<NudeButton
tooltip={{ content: t("New doc"), delay: 500 }}
onClick={(ev) => {
ev.preventDefault();
setIsAddingNewChild();
handleExpand();
}}
>
<PlusIcon />
</NudeButton>
{can.createDocument && (
<NudeButton
tooltip={{ content: t("New doc"), delay: 500 }}
onClick={(ev) => {
ev.preventDefault();
setIsAddingNewChild();
handleExpand();
}}
>
<PlusIcon />
</NudeButton>
)}
<CollectionMenu
collection={collection}
onRename={handleRename}