Skip to content

Commit

Permalink
Merge pull request #117 from maryia-matskevich-deriv/maryia/BOT-2340
Browse files Browse the repository at this point in the history
maryia/BOT-2340/fix: [App Separation] UI Bugs (part 2)
  • Loading branch information
sandeep-deriv authored Nov 12, 2024
2 parents 9ff6d3f + 3b0dea6 commit 366ab95
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 18 deletions.
4 changes: 4 additions & 0 deletions src/app/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@
opacity: 1;
z-index: 9998;
}

strong {
font-weight: bold;
}
42 changes: 24 additions & 18 deletions src/components/layout/header/menu-items/menu-items.tsx
Original file line number Diff line number Diff line change
@@ -1,34 +1,40 @@
import { observer } from 'mobx-react-lite';
import { useStore } from '@/hooks/useStore';
import { useTranslations } from '@deriv-com/translations';
import { MenuItem, Text, useDevice } from '@deriv-com/ui';
import { MenuItems as items, TRADERS_HUB_LINK_CONFIG } from '../header-config';
import './menu-items.scss';

export const MenuItems = () => {
export const MenuItems = observer(() => {
const { localize } = useTranslations();
const { isDesktop } = useDevice();
const store = useStore();
if (!store) return null;
const { is_logged_in } = store.client;

return (
<>
{isDesktop ? (
items.map(({ as, href, icon, label }) => (
<MenuItem as={as} className='app-header__menu' href={href} key={label} leftComponent={icon}>
<Text>{localize(label)}</Text>
{is_logged_in &&
(isDesktop ? (
items.map(({ as, href, icon, label }) => (
<MenuItem as={as} className='app-header__menu' href={href} key={label} leftComponent={icon}>
<Text>{localize(label)}</Text>
</MenuItem>
))
) : (
<MenuItem
as={items[1].as}
className='flex gap-2 p-5'
href={items[1].href}
key={items[1].label}
leftComponent={items[1].icon}
>
<Text>{localize(items[1].label)}</Text>
</MenuItem>
))
) : (
<MenuItem
as={items[1].as}
className='flex gap-2 p-5'
href={items[1].href}
key={items[1].label}
leftComponent={items[1].icon}
>
<Text>{localize(items[1].label)}</Text>
</MenuItem>
)}
))}
</>
);
};
});

export const TradershubLink = () => (
<MenuItem
Expand Down

0 comments on commit 366ab95

Please sign in to comment.