Click on the home page, and then click on version detection. At this time, it all jumps normally. Look at the address bar, and then click on the home page. Why does the address become http://localhost:3000/-sharp/install/update/erp
? how to append it to the url of version detection? it should not be http://localhost:3000/-sharp/erp
?
how to solve this problem?
class Routes extends Component {
render() {
return(
<Router>
<Switch>
{config.map((route, index) => (
!route.private ? (
<Route
key={index}
path={route.path}
exact={route.exact}
component={route.component}
/>
) : (
<PrivateRoute
key={index}
path={route.path}
exact={route.exact}
component={route.component}
/>
)
))}
<Route render={ () => {
return ()
} }/>
</Switch>
</Router>
)
}
}
import WrappedNormalLoginForm from "../login/login"
import TableComponent from "../component/tableComponent";
import Page from "../menu/page"
export const config = [
{
path: "/",
exact: true,
component: WrappedNormalLoginForm,
},
{
path: "/erp",
component: Page,
private: true,
},
{
path: "/install/update/checkUpdate",
component: TableComponent,
private: true,
}
]