feat: render existing instance in pair device

This commit is contained in:
RadoslavDimchev 2023-12-20 07:57:15 +02:00
parent 1175e1f4af
commit 328bc5fce7
1 changed files with 18 additions and 7 deletions

View File

@ -10,6 +10,7 @@ import PairedSuccessfully from './PairedSuccessfully'
import CreateAvatar from '../../components/General/CreateAvatar/CreateAvatar' import CreateAvatar from '../../components/General/CreateAvatar/CreateAvatar'
import GenerateId from './GenerateId' import GenerateId from './GenerateId'
import Header from '../../components/General/Header' import Header from '../../components/General/Header'
import ConnectExistingInstance from '../ConnectExistingInstance/ConnectExistingInstance'
const PairDevice = () => { const PairDevice = () => {
const [isAwaitingPairing, setIsAwaitingPairing] = useState(false) const [isAwaitingPairing, setIsAwaitingPairing] = useState(false)
@ -33,7 +34,15 @@ const PairDevice = () => {
title="Connect to existing Nimbus Instance" title="Connect to existing Nimbus Instance"
subtitle="Pair your existing device to the Nimbus Node Manager" subtitle="Pair your existing device to the Nimbus Node Manager"
/> />
{isPaired ? <PairedSuccessfully /> : <GenerateId isAwaitingPairing={isAwaitingPairing} />} {isConnectingViaIp ? (
<ConnectExistingInstance />
) : (
<>
{isPaired ? (
<PairedSuccessfully />
) : (
<GenerateId isAwaitingPairing={isAwaitingPairing} />
)}
{isPaired === false && ( {isPaired === false && (
<SyncStatus <SyncStatus
isPairing={isPairing} isPairing={isPairing}
@ -41,6 +50,8 @@ const PairDevice = () => {
changeSetIsAwaitingPairing={changeSetIsAwaitingPairing} changeSetIsAwaitingPairing={changeSetIsAwaitingPairing}
/> />
)} )}
</>
)}
{isPaired === false && ( {isPaired === false && (
<YStack space={'$3'}> <YStack space={'$3'}>
<Separator borderColor={'#e3e3e3'} /> <Separator borderColor={'#e3e3e3'} />