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 GenerateId from './GenerateId'
import Header from '../../components/General/Header'
import ConnectExistingInstance from '../ConnectExistingInstance/ConnectExistingInstance'
const PairDevice = () => {
const [isAwaitingPairing, setIsAwaitingPairing] = useState(false)
@ -33,13 +34,23 @@ const PairDevice = () => {
title="Connect to existing Nimbus Instance"
subtitle="Pair your existing device to the Nimbus Node Manager"
/>
{isPaired ? <PairedSuccessfully /> : <GenerateId isAwaitingPairing={isAwaitingPairing} />}
{isPaired === false && (
<SyncStatus
isPairing={isPairing}
isAwaitingPairing={isAwaitingPairing}
changeSetIsAwaitingPairing={changeSetIsAwaitingPairing}
/>
{isConnectingViaIp ? (
<ConnectExistingInstance />
) : (
<>
{isPaired ? (
<PairedSuccessfully />
) : (
<GenerateId isAwaitingPairing={isAwaitingPairing} />
)}
{isPaired === false && (
<SyncStatus
isPairing={isPairing}
isAwaitingPairing={isAwaitingPairing}
changeSetIsAwaitingPairing={changeSetIsAwaitingPairing}
/>
)}
</>
)}
{isPaired === false && (
<YStack space={'$3'}>