Skip to content

Commit

Permalink
feat: kyberdao header
Browse files Browse the repository at this point in the history
  • Loading branch information
viet-nv committed Jul 26, 2024
1 parent 9fe50ac commit 5cffcbd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/components/Header/groups/CampaignNavGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ const CampaignNavGroup = () => {
const isActive = pathname.includes('/campaigns')
const upTo500 = useMedia('(max-width: 500px)')

if (upTo500) return null
// if (upTo500) return null

return (
<>
<NavGroup
dropdownAlign={'left'}
dropdownAlign={upTo500 ? 'right' : 'left'}
isActive={isActive}
anchor={
<DropdownTextAnchor style={{ position: 'relative', width: '115px' }}>
Expand Down
5 changes: 3 additions & 2 deletions src/components/Header/groups/KyberDaoGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ const KyberDAONavGroup = () => {
const { pathname } = useLocation()
const isActive = pathname.includes(APP_PATHS.KYBERDAO_STAKE)
const { mixpanelHandler } = useMixpanel()
const upTo600 = useMedia('(max-width: 600px)')
const upTo500 = useMedia('(max-width: 500px)')
if (upTo500) return null

return (
<KyberDaoWrapper id={TutorialIds.KYBER_DAO_LINK}>
<NavGroup
dropdownAlign={upTo600 ? 'right' : 'left'}
dropdownAlign={upTo500 ? 'right' : 'left'}
isActive={isActive}
anchor={
<DropdownTextAnchor>
Expand Down
14 changes: 7 additions & 7 deletions src/components/Menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import ArrowRight from 'components/Icons/ArrowRight'
import Faucet from 'components/Icons/Faucet'
import Icon from 'components/Icons/Icon'
import MailIcon from 'components/Icons/MailIcon'
import VoteIcon from 'components/Icons/Vote'
import LanguageSelector from 'components/LanguageSelector'
import Loader from 'components/Loader'
import MenuFlyout from 'components/MenuFlyout'
Expand Down Expand Up @@ -321,19 +322,18 @@ export default function Menu() {
<>
<MenuItem>
<NavDropDown
icon={<Info />}
icon={<VoteIcon />}
title={
<Text sx={{ position: 'relative' }} width="max-content">
Campaigns
<NewLabel style={{ position: 'absolute', right: '-1.5rem' }}>New</NewLabel>
KyberDAO
</Text>
}
link={'/campaigns'}
options={[
{ link: '/campaigns/aggregator', label: 'Aggregator Trading' },
{ link: '/campaigns/limit-order', label: 'Limit Order' },
{ link: '/campaigns/referrals', label: 'Referral' },
{ link: '/campaigns/dashboard', label: 'My Dashboard' },
{ link: APP_PATHS.KYBERDAO_STAKE, label: 'Stake KNC' },
{ link: APP_PATHS.KYBERDAO_VOTE, label: 'Vote' },
{ link: APP_PATHS.KYBERDAO_KNC_UTILITY, label: 'KNC Utility' },
{ link: 'https://kyberswap.canny.io/feature-request', label: 'Feature Request', external: true },
]}
/>
</MenuItem>
Expand Down

0 comments on commit 5cffcbd

Please sign in to comment.