diff --git a/apps/web/app/(app)/environments/[environmentId]/settings/SettingsNavbar.tsx b/apps/web/app/(app)/environments/[environmentId]/settings/SettingsNavbar.tsx index 00364dd54a..9ffa11ec60 100644 --- a/apps/web/app/(app)/environments/[environmentId]/settings/SettingsNavbar.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/settings/SettingsNavbar.tsx @@ -4,6 +4,8 @@ import { useProduct } from "@/lib/products/products"; import { useTeam } from "@/lib/teams/teams"; import { truncate } from "@/lib/utils"; import { IS_FORMBRICKS_CLOUD } from "@formbricks/lib/constants"; +import { Popover, PopoverTrigger, PopoverContent } from "@formbricks/ui"; +import { ChevronDownIcon } from "@heroicons/react/20/solid"; import { AdjustmentsVerticalIcon, BellAlertIcon, @@ -21,12 +23,14 @@ import { import clsx from "clsx"; import Link from "next/link"; import { usePathname } from "next/navigation"; -import { useMemo } from "react"; +import { useMemo, useState } from "react"; export default function SettingsNavbar({ environmentId }: { environmentId: string }) { const pathname = usePathname(); const { team } = useTeam(environmentId); const { product } = useProduct(environmentId); + const [mobileNavMenuOpen, setMobileNavMenuOpen] = useState(false); + interface NavigationLink { name: string; href: string; @@ -181,42 +185,94 @@ export default function SettingsNavbar({ environmentId }: { environmentId: strin if (!navigation) return null; return ( -
- -
+ ))} + + +
+ + setMobileNavMenuOpen(!mobileNavMenuOpen)}> + + Settings + + + +
+ {navigation.map((item) => ( +
+

+ {item.title}{" "} + {item.title === "Product" && product?.name && ( + ({truncate(product?.name, 10)}) + )} + {item.title === "Team" && team?.name && ( + ({truncate(team?.name, 14)}) + )} +

+
+ {item.links + .filter((l) => !l.hidden) + .map((link) => ( + setMobileNavMenuOpen(false)} + className={clsx( + link.current + ? "bg-slate-100 text-slate-900" + : "text-slate-900 hover:bg-slate-50 ", + "group flex items-center whitespace-nowrap rounded-md px-1 py-1 pl-2 text-sm font-medium " + )}> +
+
+ ))} +
+
+
+
+ ); } diff --git a/apps/web/app/(app)/environments/[environmentId]/settings/layout.tsx b/apps/web/app/(app)/environments/[environmentId]/settings/layout.tsx index 00a74101aa..531d736c3c 100644 --- a/apps/web/app/(app)/environments/[environmentId]/settings/layout.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/settings/layout.tsx @@ -8,10 +8,10 @@ export const metadata: Metadata = { export default function SettingsLayout({ children, params }) { return ( <> -
+
-
-
+
+
{children}