diff --git a/keep-ui/components/navbar/DashboardLink.tsx b/keep-ui/components/navbar/DashboardLink.tsx
index cc046de60..80016e0bf 100644
--- a/keep-ui/components/navbar/DashboardLink.tsx
+++ b/keep-ui/components/navbar/DashboardLink.tsx
@@ -1,8 +1,8 @@
-import { useSortable } from '@dnd-kit/sortable';
+import { useSortable } from "@dnd-kit/sortable";
import { Subtitle } from "@tremor/react";
import { FiLayout } from "react-icons/fi";
import { LinkWithIcon } from "components/LinkWithIcon"; // Ensure you import this correctly
-import classNames from 'classnames';
+import { clsx } from "clsx";
interface Dashboard {
id: string;
@@ -14,31 +14,40 @@ type DashboardLinkProps = {
dashboard: Dashboard;
pathname: string | null;
deleteDashboard: (id: string) => void;
+ titleClassName?: string;
};
-export const DashboardLink = ({ dashboard, pathname, deleteDashboard }: DashboardLinkProps) => {
+export const DashboardLink = ({
+ dashboard,
+ pathname,
+ deleteDashboard,
+ titleClassName,
+}: DashboardLinkProps) => {
const href = `/dashboard/${dashboard.dashboard_name}`;
- const isActive = decodeURIComponent(pathname|| "") === href;
-
- const { isDragging } =
- useSortable({
- id: dashboard.id,
- });
+ const isActive = decodeURIComponent(pathname || "") === href;
+ const { isDragging } = useSortable({
+ id: dashboard.id,
+ });
return (
deleteDashboard(dashboard.id)}
- >
-
- {dashboard.dashboard_name}
-
-
+ href={href}
+ icon={FiLayout}
+ isDeletable={true}
+ onDelete={() => deleteDashboard(dashboard.id)}
+ >
+
+ {dashboard.dashboard_name}
+
+
);
};
diff --git a/keep-ui/components/navbar/DashboardLinks.tsx b/keep-ui/components/navbar/DashboardLinks.tsx
index cf0cab3d4..80fcc9c35 100644
--- a/keep-ui/components/navbar/DashboardLinks.tsx
+++ b/keep-ui/components/navbar/DashboardLinks.tsx
@@ -13,7 +13,7 @@ import { DashboardLink } from "./DashboardLink";
import { Subtitle, Button, Badge, Text } from "@tremor/react";
import { Disclosure } from "@headlessui/react";
import { IoChevronUp } from "react-icons/io5";
-import classNames from "classnames";
+import clsx from "clsx";
import { useDashboards } from "utils/hooks/useDashboards";
import { useApiUrl } from "utils/hooks/useConfig";
@@ -105,7 +105,7 @@ export const DashboardLinks = ({ session }: DashboardProps) => {
Beta
{
dashboard={dashboard}
pathname={pathname}
deleteDashboard={deleteDashboard}
+ titleClassName="max-w-[150px] overflow-hidden overflow-ellipsis"
/>
))
) : (