feat: pass new props to address ports component
This commit is contained in:
parent
e7ca4b66cb
commit
37469831e1
|
@ -2,12 +2,17 @@ import { Separator, XStack, YStack } from 'tamagui'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { Button, Input, Text } from '@status-im/components'
|
import { Button, Input, Text } from '@status-im/components'
|
||||||
import { SettingsIcon, ClearIcon } from '@status-im/icons'
|
import { SettingsIcon, ClearIcon } from '@status-im/icons'
|
||||||
|
import { useSelector } from 'react-redux'
|
||||||
|
|
||||||
import AddressPortInputs from './AddressAndPortInputs'
|
import AddressPortInputs from './AddressAndPortInputs'
|
||||||
|
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(
|
||||||
|
(state: RootState) => state.pairDevice,
|
||||||
|
)
|
||||||
|
|
||||||
const changeApiToken = (value: string) => {
|
const changeApiToken = (value: string) => {
|
||||||
setApiToken(value)
|
setApiToken(value)
|
||||||
|
@ -37,12 +42,20 @@ const ConnectViaIP = () => {
|
||||||
<AddressPortInputs
|
<AddressPortInputs
|
||||||
addressType={'Validator Client'}
|
addressType={'Validator Client'}
|
||||||
portType={'VC'}
|
portType={'VC'}
|
||||||
|
address={vcAddress}
|
||||||
|
port={vcPort}
|
||||||
|
isAdvanced={isAdvanced}
|
||||||
|
/>
|
||||||
|
<AddressPortInputs
|
||||||
|
addressType={'Beacon'}
|
||||||
|
portType={'Beacon'}
|
||||||
|
address={beaconAddress}
|
||||||
|
port={beaconPort}
|
||||||
isAdvanced={isAdvanced}
|
isAdvanced={isAdvanced}
|
||||||
/>
|
/>
|
||||||
<AddressPortInputs addressType={'Beacon'} portType={'Beacon'} isAdvanced={isAdvanced} />
|
|
||||||
</YStack>
|
</YStack>
|
||||||
) : (
|
) : (
|
||||||
<AddressPortInputs addressType={'Node'} portType={''} isAdvanced={isAdvanced} />
|
<AddressPortInputs addressType={'Node'} address={nodeAddress} />
|
||||||
)}
|
)}
|
||||||
<Separator borderColor={'#e3e3e3'} />
|
<Separator borderColor={'#e3e3e3'} />
|
||||||
<YStack space={'$2'}>
|
<YStack space={'$2'}>
|
||||||
|
|
Loading…
Reference in New Issue