Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

169
Views
Antd: how to make a SubMenu be a clickable link?

I'm working on a Next.js app and I'm using antd's Menu and Submenu for my NavBar, and I'm trying to figure out how to make SubMenu be a clickable link. What is the way to do this?

<Menu className={styles.menuContainer} mode={mode} dashed={false}>
    <Menu.Item key='setting:1'>
      <Link href='/About'>About</Link>
    </Menu.Item>
    // have this point to '/resources'
    <SubMenu key='SubMenu' title='Resources'>
      <Menu.Item key='setting:2'>
        <Link href='/blog'>Blog</Link>
      </Menu.Item>
      <Menu.Item key='setting:3'>
        <Link href='/faq'>FAQ</Link>
      </Menu.Item>
      <Menu.Item key='setting:4'>
        <Link href='/events'>
          Events
        </Link>
      </Menu.Item>
    </SubMenu>
  </Menu>
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You have to use to="#" instead of href="#" when linking. As follows:

<Link to='/about'>About</Link>
about 4 years ago · Juan Pablo Isaza Report

0

You can try this attribute

<Link href='/About' passHref><a>About</a></Link>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!