Skip to content

Commit 80c23b8

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

File tree

1 file changed

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

1 file changed

+11
-2
lines changed

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

+11-2
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,16 @@ const GatewayConnectionSettings = () => {
248248
newValues.ethernet_profile = updateInitialEthernetProfile(ethernetProfile)
249249
}
250250

251-
setInitialValues(oldValues => ({ ...oldValues, ...newValues }))
251+
setInitialValues(oldValues => ({
252+
...oldValues,
253+
...newValues,
254+
...(hasWifi && {
255+
wifi_profile: {
256+
...oldValues.wifi_profile,
257+
...newValues.wifi_profile,
258+
},
259+
}),
260+
}))
252261
},
253262
[
254263
fetchEthernetProfile,
@@ -328,7 +337,7 @@ const GatewayConnectionSettings = () => {
328337

329338
setError(undefined)
330339
try {
331-
let body = {}
340+
const body = {}
332341
const { wifi_profile, ethernet_profile } = values
333342

334343
if (hasWifi) {

0 commit comments

Comments
 (0)