Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

fix: fix workspace setting sidebar icon (#157)

Ashish Mishraa64f7bad43b2
diff --git a/apps/web/src/components/common/sidebar/sections/workspace-settings/index.tsx b/apps/web/src/components/common/sidebar/sections/workspace-settings/index.tsx
index 60ec248d0..03a207c50 100644
--- a/apps/web/src/components/common/sidebar/sections/workspace-settings/index.tsx
+++ b/apps/web/src/components/common/sidebar/sections/workspace-settings/index.tsx
@@ -1,4 +1,5 @@
import { cn } from "@/lib/cn";
+import { useUserPreferencesStore } from "@/store/user-preferences";
import useWorkspaceStore from "@/store/workspace";
import { Link } from "@tanstack/react-router";
import { useLocation } from "@tanstack/react-router";
@@ -7,7 +8,7 @@ import { Settings } from "lucide-react";
function WorkspaceSettings() {
const { workspace } = useWorkspaceStore();
const location = useLocation();
-
+ const { isSidebarOpened } = useUserPreferencesStore();
const isOnWorkspaceRoute = location.pathname.includes("/workspace-settings");
if (!workspace) return null;
@@ -23,8 +24,13 @@ function WorkspaceSettings() {
: "text-zinc-600 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-zinc-800 hover:text-zinc-900 dark:hover:text-zinc-100",
)}
>
- <Settings className="w-4 h-4" />
- <span>Workspace Settings</span>
+ <Settings
+ className={cn(
+ "shrink-0",
+ !isSidebarOpened ? "w-6 h-6" : "w-4 h-4 mr-2",
+ )}
+ />
+ {isSidebarOpened && "Workspace Settings"}
</Link>
);
}