mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Using syncKubeconfigEntries.replace() (#6837)
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
8156936b82
commit
29d2e1fb86
@ -3,7 +3,7 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||
import { action, computed, makeObservable, observable, reaction } from "mobx";
|
||||
import { computed, makeObservable, observable, reaction } from "mobx";
|
||||
import { disposeOnUnmount, observer } from "mobx-react";
|
||||
import React from "react";
|
||||
import { Notice } from "../../../../../../renderer/components/+extensions/notice";
|
||||
@ -59,11 +59,7 @@ class NonInjectedKubeconfigSync extends React.Component<Dependencies> {
|
||||
reaction(
|
||||
() => Array.from(this.syncs.entries(), ([filePath, kind]) => tuple.from(filePath, kind)),
|
||||
syncs => {
|
||||
action(() => {
|
||||
for (const [path] of syncs) {
|
||||
this.props.userStore.syncKubeconfigEntries.set(path, {});
|
||||
}
|
||||
});
|
||||
this.props.userStore.syncKubeconfigEntries.replace(syncs);
|
||||
},
|
||||
),
|
||||
]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user