From 99a0508e5c20c839056af44b951aef6125604aee Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Tue, 25 Apr 2023 07:54:34 -0500 Subject: [PATCH] fix: only add link in side bar if has content or children otherwise just a div --- src/app/components/SideBar.tsx | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/app/components/SideBar.tsx b/src/app/components/SideBar.tsx index 3b3994d..aebe64c 100644 --- a/src/app/components/SideBar.tsx +++ b/src/app/components/SideBar.tsx @@ -17,14 +17,18 @@ function TreeNode({ doc }: { doc: Doc }) {
  • {hasChildren ? (
    - - {doc.title} - + {doc.copy ? ( + + {doc.title} + + ) : ( +
    {doc.title}
    + )}
    setIsExpanded(!isExpanded)} @@ -60,7 +64,7 @@ function TreeNode({ doc }: { doc: Doc }) { )}
    - ) : ( + ) : doc.copy ? ( {doc.title} + ) : ( +
    {doc.title}
    )} {doc.children &&