После того, как я run-build
вызвал ошибку, кажется, что это неправильно в «реакции маршрутизатора» или что-то.При нажатии кнопки входа в систему возникает ошибка.
![enter image description here](https://i.stack.imgur.com/Agj5d.png)
return (
this.state.getuser != null &&
<div>
<Switch>
<LoginRoute exact path="/" component={LoginPage} />
<SystemRoute exact path="/home" component={HomePage} />
<SystemRoute exact path="/order" component={OrderPage} />
<SystemRoute exact path="/cook" component={CookPage} />
<SystemRoute exact path="/getmoney" component={GetmoneyPage} />
<SystemRoute exact path="/managemenu" component={ManageMunu} />
<SystemRoute exact path="/profile" component={Profile} />
<Route component={LoginPage} />
</Switch>
</div>
)
Компонент входа
render() {
if (this.state.login) { return <Redirect to='/home' /> }
const { classes } = this.props;
return (
<MuiThemeProvider theme={theme}>
...jsx...
</MuiThemeProvider>
);
}