Skip to content

Commit

Permalink
fix(ui): Don't provide the wifi configuration route if there is no wi…
Browse files Browse the repository at this point in the history
…fi configuration capability
  • Loading branch information
Hypfer committed Jan 18, 2022
1 parent 4e75531 commit 82e954e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions frontend/src/settings/SettingsRouter.tsx
Expand Up @@ -18,11 +18,15 @@ const SettingsRouter = (): JSX.Element => {
const {path} = useRouteMatch();

const [
wifiConfigurationCapabilitySupported,

combinedVirtualRestrictionsCapabilitySupported,

mapSegmentEditCapabilitySupported,
mapSegmentRenameCapabilitySupported
] = useCapabilitiesSupported(
Capability.WifiConfiguration,

Capability.CombinedVirtualRestrictions,

Capability.MapSegmentEdit,
Expand Down Expand Up @@ -74,9 +78,12 @@ const SettingsRouter = (): JSX.Element => {
<Route exact path={path + "/connectivity/ntp"}>
<NTPConnectivity/>
</Route>
<Route exact path={path + "/connectivity/wifi"}>
<WifiConnectivity/>
</Route>
{
wifiConfigurationCapabilitySupported &&
<Route exact path={path + "/connectivity/wifi"}>
<WifiConnectivity/>
</Route>
}
<Route exact path={path + "/updater"}>
<Updater/>
</Route>
Expand Down

0 comments on commit 82e954e

Please sign in to comment.