For some reason my onClick handlers are adding an empty query param to my url when I click them. I was able to fix the issue by adding event.preventDefault to my event handlers
The default type of a button tag is submit which means clicking the button will submit your form (appending the ? to your url).
To fix your example, you can add https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button Possible values are:type="button" to your buttons &/or replace your with a (since your code doesn't really seem to need the form element).
dynamically changed to an empty or invalid value.