From c5086f2163bd01b4591fb88e178fc51fd9e716d1 Mon Sep 17 00:00:00 2001
From: Sangay Thinley <59992112+sangayt1997@users.noreply.github.com>
Date: Fri, 23 Jan 2026 13:17:47 +0600
Subject: [PATCH 01/15] feat(construct): change the header content according to
figma and add multi-orgs content
---
src/components/core/index.ts | 2 +
.../core/org-switcher/org-switcher.tsx | 69 +++++++++++++++++++
.../core/profile-menu/profile-menu.tsx | 40 +----------
.../core/theme-switcher/theme-switcher.tsx | 18 +++++
src/layout/main-layout/main-layout.tsx | 6 +-
5 files changed, 95 insertions(+), 40 deletions(-)
create mode 100644 src/components/core/org-switcher/org-switcher.tsx
create mode 100644 src/components/core/theme-switcher/theme-switcher.tsx
diff --git a/src/components/core/index.ts b/src/components/core/index.ts
index e9b07528..96b1251a 100644
--- a/src/components/core/index.ts
+++ b/src/components/core/index.ts
@@ -32,3 +32,5 @@ export { Notification } from './notification/component/notification/notification
export { NotificationItem } from './notification/component/notification-item/notification-item';
export * from './notification/hooks/use-notification';
export { ExtensionBanner } from './extension-banner/extension-banner';
+export { ThemeSwitcher } from './theme-switcher/theme-switcher';
+export { OrgSwitcher } from './org-switcher/org-switcher';
diff --git a/src/components/core/org-switcher/org-switcher.tsx b/src/components/core/org-switcher/org-switcher.tsx
new file mode 100644
index 00000000..c6e20401
--- /dev/null
+++ b/src/components/core/org-switcher/org-switcher.tsx
@@ -0,0 +1,69 @@
+import { useState } from 'react';
+import { Building2, ChevronDown, ChevronUp } from 'lucide-react';
+import { useTranslation } from 'react-i18next';
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuSeparator,
+ DropdownMenuTrigger,
+} from '@/components/ui-kit/dropdown-menu';
+import { Skeleton } from '@/components/ui-kit/skeleton';
+import { useGetAccount } from '@/modules/profile/hooks/use-account';
+import { getUserRoles } from '@/hooks/use-user-roles';
+
+export const OrgSwitcher = () => {
+ const [isDropdownOpen, setIsDropdownOpen] = useState(false);
+ const { t } = useTranslation();
+
+ const { data, isLoading } = useGetAccount();
+
+ const userRoles = getUserRoles(data ?? null);
+ const translatedRoles = userRoles
+ .map((role: string) => {
+ const roleKey = role.toUpperCase();
+ return t(roleKey);
+ })
+ .join(', ');
+
+ return (
+ {translatedRoles}Organization 1
+ )}
+
{translatedRoles}
-{translatedRoles}
{translatedRoles}
{translatedRoles}
+ > )} -{translatedRoles}
{file.size}