Skip to content

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

💄 Move Conferencing below Preferences in the settings sidebar (#3387)

Luke Vella277c3eedd377
diff --git a/apps/web/src/app/[locale]/(space)/settings/components/sidebar.tsx b/apps/web/src/app/[locale]/(space)/settings/components/sidebar.tsx
index 0d78af5b1..5ed005e4c 100644
--- a/apps/web/src/app/[locale]/(space)/settings/components/sidebar.tsx
+++ b/apps/web/src/app/[locale]/(space)/settings/components/sidebar.tsx
@@ -40,6 +40,7 @@ export function AccountSidebarMenu({
}) {
const { t } = useTranslation();
const pathname = usePathname();
+ const isCalendarsEnabled = useFeatureFlag("calendars");
const menuItems = [
{
id: "profile",
@@ -53,6 +54,26 @@ export function AccountSidebarMenu({
icon: <Settings2Icon />,
href: "/settings/preferences",
},
+ ...(isCalendarsEnabled
+ ? [
+ {
+ id: "calendars",
+ label: t("calendars", { defaultValue: "Calendars" }),
+ icon: <CalendarIcon />,
+ href: "/settings/calendars",
+ },
+ ]
+ : []),
+ ...(showConferencing
+ ? [
+ {
+ id: "conferencing",
+ label: t("conferencing", { defaultValue: "Conferencing" }),
+ icon: <VideoIcon />,
+ href: "/settings/conferencing",
+ },
+ ]
+ : []),
{
id: "security",
label: t("security", { defaultValue: "Security" }),
@@ -73,26 +94,6 @@ export function AccountSidebarMenu({
},
];
- const isCalendarsEnabled = useFeatureFlag("calendars");
-
- if (isCalendarsEnabled) {
- menuItems.push({
- id: "calendars",
- label: t("calendars", { defaultValue: "Calendars" }),
- icon: <CalendarIcon />,
- href: "/settings/calendars",
- });
- }
-
- if (showConferencing) {
- menuItems.push({
- id: "conferencing",
- label: t("conferencing", { defaultValue: "Conferencing" }),
- icon: <VideoIcon />,
- href: "/settings/conferencing",
- });
- }
-
return (
<SidebarMenu>
{menuItems.map((item) => (