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

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-03-30 16:15:39 -04:00
parent 31f4382c82
commit d8953aa867

View File

@ -55,6 +55,13 @@ export class ClusterStatus extends React.Component<ClusterStatusProps> {
]);
}
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;