Sidebar bug fix ()

truncate workspace name to prevent gear icon from being shown
This commit is contained in:
Sean Hatfield 2023-10-26 10:58:55 -07:00 committed by GitHub
parent a8ec0d9584
commit 5f4d42edb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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