mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-13 11:56:26 +00:00
feat: pass props for is switch on and is checked
This commit is contained in:
parent
518dbd524f
commit
91ebee77da
@ -10,9 +10,17 @@ import { RootState } from '../../../redux/store'
|
|||||||
const ConnectViaIP = () => {
|
const ConnectViaIP = () => {
|
||||||
const [apiToken, setApiToken] = useState('')
|
const [apiToken, setApiToken] = useState('')
|
||||||
const [isAdvanced, setIsAdvanced] = useState(false)
|
const [isAdvanced, setIsAdvanced] = useState(false)
|
||||||
const { beaconPort, vcPort, nodeAddress, beaconAddress, vcAddress } = useSelector(
|
const {
|
||||||
(state: RootState) => state.pairDevice,
|
beaconPort,
|
||||||
)
|
vcPort,
|
||||||
|
nodeAddress,
|
||||||
|
beaconAddress,
|
||||||
|
vcAddress,
|
||||||
|
isBeaconSwitchOn,
|
||||||
|
isVcSwitchOn,
|
||||||
|
isBeaconChecked,
|
||||||
|
isVcChecked,
|
||||||
|
} = useSelector((state: RootState) => state.pairDevice)
|
||||||
|
|
||||||
const changeApiToken = (value: string) => {
|
const changeApiToken = (value: string) => {
|
||||||
setApiToken(value)
|
setApiToken(value)
|
||||||
@ -45,6 +53,8 @@ const ConnectViaIP = () => {
|
|||||||
address={vcAddress}
|
address={vcAddress}
|
||||||
port={vcPort}
|
port={vcPort}
|
||||||
isAdvanced={isAdvanced}
|
isAdvanced={isAdvanced}
|
||||||
|
isSwitchOn={isVcSwitchOn}
|
||||||
|
isChecked={isVcChecked}
|
||||||
/>
|
/>
|
||||||
<AddressPortInputs
|
<AddressPortInputs
|
||||||
addressType={'Beacon'}
|
addressType={'Beacon'}
|
||||||
@ -52,6 +62,8 @@ const ConnectViaIP = () => {
|
|||||||
address={beaconAddress}
|
address={beaconAddress}
|
||||||
port={beaconPort}
|
port={beaconPort}
|
||||||
isAdvanced={isAdvanced}
|
isAdvanced={isAdvanced}
|
||||||
|
isSwitchOn={isBeaconSwitchOn}
|
||||||
|
isChecked={isBeaconChecked}
|
||||||
/>
|
/>
|
||||||
</YStack>
|
</YStack>
|
||||||
) : (
|
) : (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user