Skip to content

Commit

Permalink
Merge pull request #6719 from TheThingsNetwork/fix/default-gateway-vi…
Browse files Browse the repository at this point in the history
…sibility

Fix Default gateway visibility not updating in Packet Broker view
  • Loading branch information
ryaplots authored Nov 23, 2023
2 parents d61d718 + 2c58599 commit 83f0086
Showing 1 changed file with 19 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@ import { useSelector, useDispatch } from 'react-redux'
import toast from '@ttn-lw/components/toast'

import Message from '@ttn-lw/lib/components/message'
import RequireRequest from '@ttn-lw/lib/components/require-request'

import GatewayVisibilityForm from '@console/components/gateway-visibility-form'

import attachPromise from '@ttn-lw/lib/store/actions/attach-promise'

import { setHomeNetworkDefaultGatewayVisibility } from '@console/store/actions/packet-broker'
import {
getHomeNetworkDefaultGatewayVisibility,
setHomeNetworkDefaultGatewayVisibility,
} from '@console/store/actions/packet-broker'

import { selectHomeNetworkDefaultGatewayVisibility } from '@console/store/selectors/packet-broker'

Expand Down Expand Up @@ -55,18 +59,20 @@ const DefaultGatewayVisibilityView = () => {
)

return (
<Col md={12}>
<Message
content={m.gatewayVisibilityInformation}
component="p"
className={style.routingPolicyInformation}
/>
<GatewayVisibilityForm
onSubmit={handleDefaultGatewayVisibilitySubmit}
initialValues={initialValues}
error={formError}
/>
</Col>
<RequireRequest requestAction={getHomeNetworkDefaultGatewayVisibility()}>
<Col md={12}>
<Message
content={m.gatewayVisibilityInformation}
component="p"
className={style.routingPolicyInformation}
/>
<GatewayVisibilityForm
onSubmit={handleDefaultGatewayVisibilitySubmit}
initialValues={initialValues}
error={formError}
/>
</Col>
</RequireRequest>
)
}

Expand Down

0 comments on commit 83f0086

Please sign in to comment.