Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

chore: cleanup sidebar

Marc Seitz09129209b85d
diff --git a/components/Sidebar.tsx b/components/Sidebar.tsx
index cb23cb8f..2c5d9792 100644
--- a/components/Sidebar.tsx
+++ b/components/Sidebar.tsx
@@ -89,13 +89,18 @@ export const SidebarComponent = ({ className }: { className?: string }) => {
{
name: "Documents",
href: "/documents",
- icon: router.pathname.includes("documents")
- ? FolderOpenIcon
- : FolderLucideIcon,
+ icon:
+ router.pathname.includes("documents") &&
+ !router.pathname.includes("datarooms")
+ ? FolderOpenIcon
+ : FolderLucideIcon,
current:
router.pathname.includes("documents") &&
- !router.pathname.includes("tree"),
- active: router.pathname.includes("documents"),
+ !router.pathname.includes("tree") &&
+ !router.pathname.includes("datarooms"),
+ active:
+ router.pathname.includes("documents") &&
+ !router.pathname.includes("datarooms"),
disabled: false,
},
{
@@ -187,10 +192,8 @@ export const SidebarComponent = ({ className }: { className?: string }) => {
disabled={item.disabled}
className={cn(
item.current
- ? "bg-gray-200 dark:bg-secondary text-secondary-foreground font-semibold"
- : "text-muted-foreground hover:text-foreground hover:bg-gray-200 hover:dark:bg-muted duration-200",
- router.pathname.includes("documents") &&
- "text-foreground",
+ ? "bg-gray-200 dark:bg-secondary text-foreground font-semibold"
+ : " hover:bg-gray-200 hover:dark:bg-muted duration-200",
"group flex gap-x-2 items-center rounded-md px-3 py-2 text-sm leading-6 w-full disabled:hover:bg-transparent disabled:text-muted-foreground disabled:cursor-default",
)}
>
@@ -211,10 +214,8 @@ export const SidebarComponent = ({ className }: { className?: string }) => {
disabled={item.disabled}
className={cn(
item.current
- ? "bg-gray-200 dark:bg-secondary text-secondary-foreground font-semibold"
- : "text-muted-foreground hover:text-foreground hover:bg-gray-200 hover:dark:bg-muted duration-200",
- router.pathname.includes("documents") &&
- "text-foreground",
+ ? "bg-gray-200 dark:bg-secondary text-foreground font-semibold"
+ : " hover:bg-gray-200 hover:dark:bg-muted duration-200",
"group flex gap-x-2 items-center rounded-md px-3 py-2 text-sm leading-6 w-full disabled:hover:bg-transparent disabled:text-muted-foreground disabled:cursor-default",
)}
>