mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 07:55:47 +01:00
reset the redux state if the token is expired and the user still uses the web ui
This commit is contained in:
@@ -64,6 +64,15 @@ class Index extends Component<Props, State> {
|
||||
this.props.fetchIndexResources();
|
||||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
const { indexResources, loading, error } = this.props;
|
||||
const { pluginsLoaded } = this.state;
|
||||
if (!indexResources && !loading && !error && pluginsLoaded) {
|
||||
this.props.fetchIndexResources();
|
||||
this.setState({ pluginsLoaded: false });
|
||||
}
|
||||
}
|
||||
|
||||
pluginLoaderCallback = () => {
|
||||
this.setState({
|
||||
pluginsLoaded: true
|
||||
|
||||
Reference in New Issue
Block a user