mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Lint: no-unused-expressions (error) (#4197)
This commit is contained in:
1 parent
c6dab62e99
commit
e74f17e8ce
9 files changed
+79
-50
No files matched your search
@@ -40,30 +40,23 @@ interface Props {
|
||||
export const ContainerEnvironment = observer((props: Props) => {
|
||||
const { container: { env, envFrom }, namespace } = props;
|
||||
|
||||
useEffect(
|
||||
() =>
|
||||
autorun(() => {
|
||||
env && env.forEach(variable => {
|
||||
const { valueFrom } = variable;
|
||||
useEffect( () => autorun(() => {
|
||||
for (const { valueFrom } of env ?? []) {
|
||||
if (valueFrom?.configMapKeyRef) {
|
||||
configMapsStore.load({ name: valueFrom.configMapKeyRef.name, namespace });
|
||||
}
|
||||
}
|
||||
|
||||
if (valueFrom && valueFrom.configMapKeyRef) {
|
||||
configMapsStore.load({ name: valueFrom.configMapKeyRef.name, namespace });
|
||||
}
|
||||
});
|
||||
envFrom && envFrom.forEach(item => {
|
||||
const { configMapRef, secretRef } = item;
|
||||
for (const { configMapRef, secretRef } of envFrom ?? []) {
|
||||
if (secretRef?.name) {
|
||||
secretsStore.load({ name: secretRef.name, namespace });
|
||||
}
|
||||
|
||||
if (secretRef && secretRef.name) {
|
||||
secretsStore.load({ name: secretRef.name, namespace });
|
||||
}
|
||||
|
||||
if (configMapRef && configMapRef.name) {
|
||||
configMapsStore.load({ name: configMapRef.name, namespace });
|
||||
}
|
||||
});
|
||||
}),
|
||||
[]
|
||||
);
|
||||
if (configMapRef?.name) {
|
||||
configMapsStore.load({ name: configMapRef.name, namespace });
|
||||
}
|
||||
}
|
||||
}), []);
|
||||
|
||||
const renderEnv = () => {
|
||||
const orderedEnv = _.sortBy(env, "name");
|
||||
|
||||
Reference in new issue
Block a user