So I have a deployed a react app to heroku. In local host the routes work fine. The default being homepage and the 'portal/' going to the login/sign up page which works normal with http://localhost:3000/portal.
On heroku however it just redirects/stays on the homepage. Even if I do a route that doesnt exist? something like https://my-hero-app.com/random-route
I am using a github-heroku pipeline so its always up to date
let me know if you need any more information! Thanks!
import { BrowserRouter, Routes, Route } from "react-router-dom";
import Homepage from './pages/homepage/Homepage'
import Portal from './pages/portal/Portal'
function App() {
return (
<div className="App">
<BrowserRouter>
<Routes>
<Route path="/" element={<Homepage />}></Route>
<Route path="/portal" element={<Portal />}></Route>
</Routes>
</BrowserRouter>
</div>
);
}
export default App;