1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Reset ClusterStatus state when switching clusters (#5149)

This commit is contained in:
Sebastian Malton 2022-04-01 12:02:04 -04:00 committed by GitHub
parent cfc702f89f
commit 85f2ce7504
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,6 +60,13 @@ class NonInjectedClusterStatus extends React.Component<ClusterStatusProps & Depe
]);
}
componentDidUpdate(prevProps: Readonly<ClusterStatusProps>): void {
if (prevProps.cluster.id !== this.props.cluster.id) {
this.isReconnecting = false;
this.authOutput = [];
}
}
reconnect = async () => {
this.authOutput = [];
this.isReconnecting = true;