mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-09 10:03:36 +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 [apiToken, setApiToken] = useState('')
|
||||
const [isAdvanced, setIsAdvanced] = useState(false)
|
||||
const { beaconPort, vcPort, nodeAddress, beaconAddress, vcAddress } = useSelector(
|
||||
(state: RootState) => state.pairDevice,
|
||||
)
|
||||
const {
|
||||
beaconPort,
|
||||
vcPort,
|
||||
nodeAddress,
|
||||
beaconAddress,
|
||||
vcAddress,
|
||||
isBeaconSwitchOn,
|
||||
isVcSwitchOn,
|
||||
isBeaconChecked,
|
||||
isVcChecked,
|
||||
} = useSelector((state: RootState) => state.pairDevice)
|
||||
|
||||
const changeApiToken = (value: string) => {
|
||||
setApiToken(value)
|
||||
@ -45,6 +53,8 @@ const ConnectViaIP = () => {
|
||||
address={vcAddress}
|
||||
port={vcPort}
|
||||
isAdvanced={isAdvanced}
|
||||
isSwitchOn={isVcSwitchOn}
|
||||
isChecked={isVcChecked}
|
||||
/>
|
||||
<AddressPortInputs
|
||||
addressType={'Beacon'}
|
||||
@ -52,6 +62,8 @@ const ConnectViaIP = () => {
|
||||
address={beaconAddress}
|
||||
port={beaconPort}
|
||||
isAdvanced={isAdvanced}
|
||||
isSwitchOn={isBeaconSwitchOn}
|
||||
isChecked={isBeaconChecked}
|
||||
/>
|
||||
</YStack>
|
||||
) : (
|
||||
|
Loading…
x
Reference in New Issue
Block a user