couds / react-bulma-components

React components for Bulma framework
MIT License
1.2k stars 129 forks source link

nextjs `basePath` not applied on Navbar.Item #423

Closed mapsmarketing closed 8 months ago

mapsmarketing commented 1 year ago

Describe the bug I noticed that when basePath is set in next.config.js it's not actually used by Navbar.Item and I am assuming the same issue would apply across any other elements such as Button, etc.

To Reproduce Steps to reproduce the behavior:

  1. Set a basePath is set in next.config.js
  2. Add a Navbar.Item with a href

Expected behavior If the basePath is set to /foo/bar the Navbar.Item should use this in the href e.g. /foo/bar/my-page

My Page **Screenshots** If applicable, add screenshots to help explain your problem. **Versions** - `next`: v^13.4.6 - `react-bulma-components:`: ^4.1.0 - `bulma`: ^0.9.4 - `react`: ^18.2.0 - `react-dom`: ^18.2.0 - Browser: Chrome v114.0.5735.133
couds commented 8 months ago

Hello! BasePath it's a configuration from next.js and it's outside the scope of this library,.

To use the nextjs navigation you will need tu pass the component Link from Next module to the renderAs prop

<Navbar.Item renderAs={Link} href="/my-page">
  My Page
</Navbar.Item>
mapsmarketing commented 8 months ago

All good @couds ! This was from months ago and I don't even remember much about it. I've since switched to MUI because it was much better. Cheers on the reply though