I uploaded my project to heroku and at first it seemed like everything worked out, the home page loads normal but when I try to access the following pages it just gives me a Cannot get/
const Routes: React.FC = () => {
return(
<Switch>
<Route path='/' exact component={Home} />
<Route path='/alunos' exact component={Alunos} />
<Route path='/cadastro_aluno' exact component={AlunosForm} />
<Route path='/tarefas_cadastro/:id' exact component={AlunosForm} />
<Route path='/alunos/:id' exact component={AlunosDetail} />
<Route path='/loc' exact component={AlunosLoc} />
</Switch>
);
}
export default Routes;
server.js
const express = require('express')
const app = express()
const PORT = process.env.PORT || 3102
app.use(express.static('build'))
app.listen(PORT, () => console.log('Servidor Front em execução!'))
<Navbar.Brand href="/">Home</Navbar.Brand>
<Navbar.Toggle aria-controls="responsive-navbar-nav" />
<Navbar.Collapse id="responsive-navbar-nav">
<Nav className="me-auto">
<Nav.Link as = {Link} to="/alunos">Alunos</Nav.Link>
<NavDropdown title="Mais" id="collasible-nav-dropdown">
I made some changes to the header, added the import Link and made the links for it ( as = {Link}), thanks everyone for the help