Skip to content

Commit

Permalink
fix: menu bar (dw-239) (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
BOBOtoTHEmoon committed Oct 27, 2023
1 parent 09d48eb commit 632419a
Showing 1 changed file with 53 additions and 40 deletions.
93 changes: 53 additions & 40 deletions components/_common/nav-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,61 +15,41 @@ const NAV_LINKS = [
name: 'About Us',
href: '/about-us',
},
{
name: 'Token',
href: '/token',
},
{
name: 'Dashboard',
href: 'https://banklessdao.nodeblocks.io/',
},
{
name: 'Rewards',
href: 'https://rewards.bankless.community/',
},
{
name: 'Read',
href: '/read',
},
{
name: 'Listen',
href: '/listen',
},
{
name: 'Work With Us',
href: '/work-with-us',
},
{
name: 'Join Us',
href: '/join-us',
name: 'Governance',
href: '/about-us/governance',
},
]

const aboutUsLinksData = [
{
title: 'Governance',
href: '/about-us/governance',
alt: 'Link to Governance page',
},
{
title: 'Departments',
href: '/about-us/departments',
alt: 'Link to Departments page',
},
{
title: 'Projects',
href: '/about-us/projects',
alt: 'Link to Projects page',
},
{
title: 'Guilds',
href: '/about-us/guilds',
alt: 'Link to Guilds page',
},
{
title: 'Projects',
href: '/about-us/projects',
alt: 'Link to Projects page',
title: 'Read',
href: '/read',
alt: 'Link to Read Page',
},
{
title: 'Community Calls',
href: '/about-us/community-calls',
alt: 'Link to Community Calls page',
title: 'Listen',
href: '/listen',
alt: 'Link to Listen Page',
},
{
title: 'Media Nodes',
Expand All @@ -78,22 +58,51 @@ const aboutUsLinksData = [
},
]

const tokenLinksData = [
const workWithUsLinksData = [
{
title: 'Lock BANK',
href: '/tlBank',
alt: 'Link to Lock BANK page',
title: 'Join Us',
href: '/join-us',
alt: 'Link to Join Us page',
},
{
title: 'Community Calls',
href: '/about-us/community-calls',
alt: 'Link to Community Calls page',
},
]

const joinUsLinksData = [
{
title: 'Onboarding',
href: 'https://onboarding.bankless.community/',
alt: 'Link to Onboarding page',
},
{
title: 'Rewards',
href: 'https://rewards.bankless.community/',
alt: 'Link to Rewards page',
},
]

const governanceLinksData = [
{
title: 'Dashboard',
href: 'https://banklessdao.nodeblocks.io/',
alt: 'Link to Dashboard page',
},
{
title: 'Token',
href: '/token',
alt: 'Link to Token page',
},
{
title: 'Lock BANK',
href: '/tlBank',
alt: 'Link to Lock BANK page',
},
]

const tokenLinksData = []

const joinUsLinksData = []

type Link = {
title: string
href: string
Expand Down Expand Up @@ -304,6 +313,8 @@ const MenuLinks = ({ isOpen }) => {
const isAboutUs = _navLink.name === 'About Us'
const isToken = _navLink.name === 'Token'
const isJoinUs = _navLink.name === 'Join Us'
const isWork = _navLink.name === 'Work With Us'
const isGovernance = _navLink.name === 'Governance'

return (
<Box
Expand All @@ -319,8 +330,10 @@ const MenuLinks = ({ isOpen }) => {
>
<MenuItem to={_navLink.href}>{_navLink.name}</MenuItem>
{isAboutUs && <DropdownMenu linksData={aboutUsLinksData} />}
{isWork && <DropdownMenu linksData={workWithUsLinksData} />}
{isToken && <DropdownMenu linksData={tokenLinksData} />}
{isJoinUs && <DropdownMenu linksData={joinUsLinksData} />}
{isGovernance && <DropdownMenu linksData={governanceLinksData} />}
</Box>
)
})}
Expand Down

1 comment on commit 632419a

@vercel
Copy link

@vercel vercel bot commented on 632419a Oct 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.