diff --git a/src/components/CompanySwitcher.tsx b/src/components/CompanySwitcher.tsx index 7a583dd0b..83a925603 100644 --- a/src/components/CompanySwitcher.tsx +++ b/src/components/CompanySwitcher.tsx @@ -37,6 +37,7 @@ import { useHandleCurrentUserChangeProperty } from '$app/common/hooks/useHandleC import { useCurrentUser } from '$app/common/hooks/useCurrentUser'; import { useUpdateCompanyUser } from '$app/pages/settings/user/common/hooks/useUpdateCompanyUser'; import { useInjectUserChanges } from '$app/common/hooks/useInjectUserChanges'; +import { useColorScheme } from '$app/common/colors'; const SwitcherDiv = styled.div` &:hover { @@ -57,6 +58,7 @@ export function CompanySwitcher() { const logo = useLogo(); const location = useLocation(); + const colors = useColorScheme(); const companyName = useCompanyName(); const queryClient = useQueryClient(); const { isAdmin, isOwner } = useAdmin(); @@ -141,8 +143,8 @@ export function CompanySwitcher() { src={logo} alt="Company logo" style={{ - borderColor: '#FFFFFF19', - width: '1.5rem', + borderColor: '#e5e7eb', + width: '1.66rem', }} /> @@ -163,29 +165,23 @@ export function CompanySwitcher() { >
- +
Company logo - + {companyName} - - + +
- +
@@ -211,23 +207,19 @@ export function CompanySwitcher() { leaveTo="transform opacity-0 scale-95" > -
+
-

- {t('signed_in_as')} -

+

{t('signed_in_as')}

-

+

{currentUser?.email}

@@ -236,24 +228,21 @@ export function CompanySwitcher() {
{state?.api?.length >= 1 && state?.api?.map((record: any, index: number) => (
{index === 0 && ( -

+

{t('company')}

)} preventNavigation({ fn: () => switchCompany(index), @@ -268,7 +257,7 @@ export function CompanySwitcher() { src={record.company.settings.company_logo} alt="Company logo" style={{ - borderColor: '#FFFFFF19', + borderColor: colors.$4, width: '1.5rem', }} /> @@ -283,16 +272,15 @@ export function CompanySwitcher() { /> )} -
+
{record.company.settings.name || t('untitled_company')}
- {state.currentIndex === index && } + {state.currentIndex === index && ( + + )}
@@ -307,17 +295,12 @@ export function CompanySwitcher() {
setIsCompanyCreateModalOpened(true)} > - - {t('add_company')} - + {t('add_company')}
@@ -328,7 +311,7 @@ export function CompanySwitcher() {
preventNavigation({ url: '/settings/account_management', @@ -337,12 +320,7 @@ export function CompanySwitcher() { > - - {t('account_management')} - + {t('account_management')}
@@ -352,7 +330,7 @@ export function CompanySwitcher() {
preventNavigation({ url: '/logout', @@ -361,12 +339,7 @@ export function CompanySwitcher() { > - - {t('logout')} - + {t('logout')}
diff --git a/src/components/icons/Check.tsx b/src/components/icons/Check.tsx index cf259e1ea..f16c301b3 100644 --- a/src/components/icons/Check.tsx +++ b/src/components/icons/Check.tsx @@ -8,21 +8,25 @@ * @license https://www.elastic.co/licensing/elastic-license */ -export function Check() { +type Props = { + color?: string; +}; + +export function Check({ color = '#18181B' }: Props) { return ( setSidebarOpen(true)} > Open sidebar - +
- +
)} diff --git a/src/components/layouts/components/DesktopSidebar.tsx b/src/components/layouts/components/DesktopSidebar.tsx index 68e587afa..866e27808 100644 --- a/src/components/layouts/components/DesktopSidebar.tsx +++ b/src/components/layouts/components/DesktopSidebar.tsx @@ -68,7 +68,7 @@ export function DesktopSidebar(props: Props) { } )} style={{ - borderColor: '#FFFFFF13', + borderColor: 'white', color: colors.$3, }} > diff --git a/src/components/layouts/components/MobileSidebar.tsx b/src/components/layouts/components/MobileSidebar.tsx index 0c66d97a0..a98a3334b 100644 --- a/src/components/layouts/components/MobileSidebar.tsx +++ b/src/components/layouts/components/MobileSidebar.tsx @@ -16,7 +16,6 @@ import { NavigationItem } from './DesktopSidebar'; import { SidebarItem } from './SidebarItem'; import { useColorScheme } from '$app/common/colors'; import { useInjectUserChanges } from '$app/common/hooks/useInjectUserChanges'; -import { useLogo } from '$app/common/hooks/useLogo'; import { HelpSidebarIcons } from '$app/components/HelpSidebarIcons'; interface Props { @@ -26,7 +25,6 @@ interface Props { } export function MobileSidebar(props: Props) { - const logo = useLogo(); const colors = useColorScheme(); const user = useInjectUserChanges(); @@ -62,7 +60,10 @@ export function MobileSidebar(props: Props) { leaveFrom="translate-x-0" leaveTo="-translate-x-full" > -
+
- {isMiniSidebar ? ( - Company logo - ) : ( - - )} +