Skip to content

Commit

Permalink
fixup! console: Conditionally show WiFi and ethernet config and conne…
Browse files Browse the repository at this point in the history
…ctions
  • Loading branch information
johanstokking committed Dec 16, 2024
1 parent 7366980 commit ef0b070
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,18 @@ const GatewayConnectionSettings = () => {
newValues.ethernet_profile = updateInitialEthernetProfile(ethernetProfile)
}

setInitialValues(oldValues => ({ ...oldValues, ...newValues }))
setInitialValues(oldValues => ({
...oldValues,
...(hasWifi && {
wifi_profile: {
...oldValues.wifi_profile,
...newValues.wifi_profile,
},
}),
...(hasEthernet && {
ethernet_profile: newValues.ethernet_profile,
}),
}))
},
[
fetchEthernetProfile,
Expand Down Expand Up @@ -328,7 +339,7 @@ const GatewayConnectionSettings = () => {

setError(undefined)
try {
let body = {}
const body = {}
const { wifi_profile, ethernet_profile } = values

if (hasWifi) {
Expand Down

0 comments on commit ef0b070

Please sign in to comment.