Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

💄 Update menus

Luke Vellaf6891a175582
diff --git a/apps/web/src/app/[locale]/(space)/(dashboard)/components/sidebar/nav-user.tsx b/apps/web/src/app/[locale]/(space)/(dashboard)/components/sidebar/nav-user.tsx
index 85fe51628..c52057ec0 100644
--- a/apps/web/src/app/[locale]/(space)/(dashboard)/components/sidebar/nav-user.tsx
+++ b/apps/web/src/app/[locale]/(space)/(dashboard)/components/sidebar/nav-user.tsx
@@ -5,6 +5,7 @@ import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
+ DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@rallly/ui/dropdown-menu";
@@ -52,7 +53,14 @@ export function NavUser({
</Icon>
</Button>
</DropdownMenuTrigger>
- <DropdownMenuContent align="end" side="top">
+ <DropdownMenuContent
+ className="w-[var(--radix-dropdown-menu-trigger-width)]"
+ align="end"
+ side="top"
+ >
+ <DropdownMenuLabel>
+ <Trans i18nKey="account" defaults="Account" />
+ </DropdownMenuLabel>
<DropdownMenuItem asChild>
<Link href="/account/profile">
<Icon>
diff --git a/apps/web/src/app/[locale]/account/components/sidebar.tsx b/apps/web/src/app/[locale]/account/components/sidebar.tsx
index fb7395983..16d06f65b 100644
--- a/apps/web/src/app/[locale]/account/components/sidebar.tsx
+++ b/apps/web/src/app/[locale]/account/components/sidebar.tsx
@@ -15,9 +15,11 @@ import {
import Link from "next/link";
import { usePathname } from "next/navigation";
import { useTranslation } from "@/i18n/client";
+import { useFeatureFlag } from "@/lib/feature-flags/client";
export function AccountSidebarMenu() {
const { t } = useTranslation();
+ const isBillingEnabled = useFeatureFlag("billing");
const pathname = usePathname();
const menuItems = [
{
@@ -38,13 +40,17 @@ export function AccountSidebarMenu() {
icon: <LayersIcon />,
href: "/account/spaces",
},
- {
+ ];
+
+ if (isBillingEnabled) {
+ menuItems.push({
id: "billing",
label: t("billing", { defaultValue: "Billing" }),
icon: <CreditCardIcon />,
href: "/account/billing",
- },
- ];
+ });
+ }
+
return (
<SidebarMenu>
{menuItems.map((item) => (