diff --git a/dashboard/src/features/bottom-menu/index.tsx b/dashboard/src/features/bottom-menu/index.tsx index 8957648..816fd49 100644 --- a/dashboard/src/features/bottom-menu/index.tsx +++ b/dashboard/src/features/bottom-menu/index.tsx @@ -4,6 +4,7 @@ import { Link } from "@tanstack/react-router"; import { FC } from "react"; import { Box, Home, Server, ServerCog, UsersIcon } from 'lucide-react'; import { useIsCurrentRoute } from "@marzneshin/hooks"; +import { cn } from "@marzneshin/utils"; type BottomMenuItemProps = Omit @@ -63,7 +64,7 @@ export const DashboardBottomMenu = ({ variant = "admin" }: { variant: "sudo-admi const { isCurrentRouteActive } = useIsCurrentRoute() const items = variant === "sudo-admin" ? sudoAdminItems : adminItems; return ( -
+
{items.map((item: BottomMenuItemProps) => ( { - - setSidebarEntityId(value ==="" ? undefined : value)} - defaultValue={String(sidebarEntityId)} - > -
- {sidebarEntities.map((entity: any) => ( - - - - ))} -
-
-
+ setSidebarEntityId(value === "" ? undefined : value)} + defaultValue={String(sidebarEntityId)} + > + + {sidebarEntities.map((entity: any) => ( + + + + ))} + +
) diff --git a/dashboard/src/routes/_dashboard.tsx b/dashboard/src/routes/_dashboard.tsx index d93d3ab..740b381 100644 --- a/dashboard/src/routes/_dashboard.tsx +++ b/dashboard/src/routes/_dashboard.tsx @@ -39,27 +39,28 @@ export const DashboardLayout = () => { return (
- - + {isDesktop && ( + + + )} - ) : ( - - - - ) } center={} end={ <> + {(!isDesktop && isSudo()) && ( + + + )} }