mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Cleanup cluster views on unmount (#2961)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
573a635e29
commit
a411f4cfe5
@ -66,6 +66,10 @@ export class ClusterView extends React.Component<Props> {
|
||||
this.bindEvents();
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
refreshViews();
|
||||
}
|
||||
|
||||
bindEvents() {
|
||||
disposeOnUnmount(this, [
|
||||
reaction(() => this.clusterId, async (clusterId) => {
|
||||
@ -81,7 +85,6 @@ export class ClusterView extends React.Component<Props> {
|
||||
const disconnected = values[1];
|
||||
|
||||
if (hasLoadedView(this.clusterId) && disconnected) {
|
||||
refreshViews();
|
||||
navigate(catalogURL()); // redirect to catalog when active cluster get disconnected/not available
|
||||
}
|
||||
}),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user