From 5f4d42edb8ad2b2d3f5606cc25ca3742a30ca06d Mon Sep 17 00:00:00 2001 From: Sean Hatfield <seanhatfield5@gmail.com> Date: Thu, 26 Oct 2023 10:58:55 -0700 Subject: [PATCH] Sidebar bug fix (#291) truncate workspace name to prevent gear icon from being shown --- frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx b/frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx index fd8d04513..8db4cfc2d 100644 --- a/frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx +++ b/frontend/src/components/Sidebar/ActiveWorkspaces/index.jsx @@ -8,6 +8,7 @@ import ManageWorkspace, { import paths from "../../../utils/paths"; import { useParams } from "react-router-dom"; import { GearSix, SquaresFour } from "@phosphor-icons/react"; +import truncate from "truncate"; export default function ActiveWorkspaces() { const { slug } = useParams(); @@ -73,7 +74,7 @@ export default function ActiveWorkspaces() { isActive ? "" : "text-opacity-80" }`} > - {workspace.name} + {isActive ? truncate(workspace.name, 17) : truncate(workspace.name, 20)} </p> </div> <button -- GitLab