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)

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
Sebastian Malton 2022-04-01 12:02:04 -04:00 committed by Jim Ehrismann
parent 65da0ce2d8
commit 6c4262820d

View File

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