Closed aiphton closed 1 month ago
Hi there,
Thank you for taking the time to debug my problem. I tried your first suggestion to update @nextui-org/react
to version 2.4.6, but unfortunately, it didn't resolve the issue.
To help you better understand the problem, I've recreated my navbar in CodeSandbox. This is a minimal example, but it reproduces the bug as described in my original posting.
The navigation buttons don't work for some reason in the sandbox. If I have some spare time, I'll investigate further.
You can replicate the bug by manually typing a URL like URL#features
and then reloading the page. For some reason, the anchor tag gets duplicated.
All the components for the navbar are located in resources/js/Components/Navbar
.
If you need more information or anything else, please let me know—I'm happy to provide it.
Here is the link to the sandbox: https://codesandbox.io/p/devbox/tqklm2
Thank you!
@aiphton which page I should go to see the navbar?
Hi, sorry I took so long to reply. I'm still trying to replicate my issue. I have problems connecting vite with laravel webserver. I'm still trying to fix that issue but I did make some progress.
When I build my files with npm run build
and then launch my application the issue does not occur. Only when I run the application with npm run dev
.
I'll get back to you once I figured out how I can replicate it on the codesandbox platform
Hi, I have been debugging this for weeks now. It seems like I configured something wrong (couldn't figure out what exactly) but I redid my whole project and now it seems to work fine.
Thank you for taking the time and reading through my issue. I'll close it with this.
NextUI Version
2.4.2
Describe the bug
System Stack
Bug description
I am using the navbar from nextui and it displays just as I expect. I use it on my landing page to navigate between anchor tags and even that works without a problem but when I visit an anchor tag and then reload the page I encounter a problem that I can not solve on my own. The anchor tag in the URL gets doubled when I visit the anchor tag and then reload the page (F5).
For example: http://localhost/#pricing http://localhost/#pricing#pricing http://localhost/#pricing#pricing#pricing#pricing ....
My setup in app.jsx looks like this:
I read that I should at a router to the navigate prop. I tried this approach:
but that did not work aswell.
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Expected behavior
Reloading the page should reload with the URL http://localhost/#pricing without doubling the anchor tag.
Screenshots or Videos
No response
Operating System Version
Developing in Docker with WSL2
Browser
Chrome