I have a url with paramenters in my react routes.

I can access the route via {Link} from react router dom as shown below. The page loads upon button click.

However when I refresh the page or try to access the URL via the address bar, I get a blank page and this error message

It works fine locally but the blank page comes up in production. I am hosting the website on heroku.
BeatDetailPage?