Skip to content

Commit ef0b070

Browse files
committed
fixup! console: Conditionally show WiFi and ethernet config and connections
1 parent 7366980 commit ef0b070

File tree

1 file changed

+13
-2
lines changed
  • pkg/webui/console/containers/gateway-managed-gateway/connection-settings

1 file changed

+13
-2
lines changed

pkg/webui/console/containers/gateway-managed-gateway/connection-settings/index.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,18 @@ const GatewayConnectionSettings = () => {
248248
newValues.ethernet_profile = updateInitialEthernetProfile(ethernetProfile)
249249
}
250250

251-
setInitialValues(oldValues => ({ ...oldValues, ...newValues }))
251+
setInitialValues(oldValues => ({
252+
...oldValues,
253+
...(hasWifi && {
254+
wifi_profile: {
255+
...oldValues.wifi_profile,
256+
...newValues.wifi_profile,
257+
},
258+
}),
259+
...(hasEthernet && {
260+
ethernet_profile: newValues.ethernet_profile,
261+
}),
262+
}))
252263
},
253264
[
254265
fetchEthernetProfile,
@@ -328,7 +339,7 @@ const GatewayConnectionSettings = () => {
328339

329340
setError(undefined)
330341
try {
331-
let body = {}
342+
const body = {}
332343
const { wifi_profile, ethernet_profile } = values
333344

334345
if (hasWifi) {

0 commit comments

Comments
 (0)