developmentseed / bioacoustics-frontend

Frontend code for the Google Bioacoustics project that's used by A2O Search
https://search.acousticobservatory.org/
MIT License
1 stars 0 forks source link

fix: Add trailing slash to random link #144

Closed oliverroick closed 1 year ago

oliverroick commented 1 year ago

I can't explain it but adding a trailing slash to the random link fixes the I'm feeling lucky result.

I think it has to do with how NextJS does its routing and how the server is set up. Without the trailing slash, the server first returns a redirect to /random/index.html, which then redirects to /search?q=undefined. I could be that the JS isn't initialised properly on /random/index.html so the URL randomiser doesn't resolve properly.