has packaged the project in yarn build and generated a serve using serve-s build. A page can appear when
visits http://localhost:5000.
but click on the subpage to access the resume details page http://localhost:5000/resume/19 has a 404 error unable to find the page, The requested path could not be found.
this problem does not occur with the http://localhost:3000/ previously accessed with yarn start.
where does the teacher have this access path mismatch?
the routing code is as follows:
import {BrowserRouter as Router,
Route,
Switch,
Link
} from "react-router-dom";
class App extends Component {
render() {
return (
<Router>
<div className="App">
<Header/>
<div className="main">
<Switch>
<Route path="/register" component={Register} />
<Route path="/login" component={Login} />
<Route path="/logout" component={Logout} />
<Route path="/myresume" component={MyResume} />
<Route path="/resume/:id" component={Resume} />
<Route path="/addresume" component={AddResume} />
<Route path="/editresume/:id" component={EditResume} />
<Route path="/" component={Index} />
</Switch>
</div>
</div>
</Router>
);
}
}-sharp-sharp-sharp problem description
the environmental background of the problems and what methods you have tried
related codes
/ / Please paste the code text below (do not replace the code with pictures)