From edd413fba3378c11240c98da0765261c2be5ca17 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Thu, 13 Feb 2025 19:30:46 -0500 Subject: [PATCH] fix: Guard new doc button on collections, supercedes #8400 --- .../Sidebar/components/CollectionLink.tsx | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/app/components/Sidebar/components/CollectionLink.tsx b/app/components/Sidebar/components/CollectionLink.tsx index 4c71b5b9f4..b8744f4a69 100644 --- a/app/components/Sidebar/components/CollectionLink.tsx +++ b/app/components/Sidebar/components/CollectionLink.tsx @@ -147,16 +147,18 @@ const CollectionLink: React.FC = ({ !isEditing && !isDraggingAnyCollection && ( - { - ev.preventDefault(); - setIsAddingNewChild(); - handleExpand(); - }} - > - - + {can.createDocument && ( + { + ev.preventDefault(); + setIsAddingNewChild(); + handleExpand(); + }} + > + + + )}