Merge pull request #25 from nimbus-gui/rd.autogenerate-id-into-pair-device
Autogenerate ID into pair device
This commit is contained in:
commit
b1990a794d
|
@ -1,7 +1,7 @@
|
||||||
import { Button, Input, Text as StatusText } from '@status-im/components'
|
import { Button, Input, Text as StatusText } from '@status-im/components'
|
||||||
import { CompleteIdIcon, CopyIcon } from '@status-im/icons'
|
import { CompleteIdIcon, CopyIcon } from '@status-im/icons'
|
||||||
import { Text } from '@tamagui/web'
|
import { Text } from '@tamagui/web'
|
||||||
import { useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import { Link } from 'react-router-dom'
|
import { Link } from 'react-router-dom'
|
||||||
import { Separator, XStack, YStack } from 'tamagui'
|
import { Separator, XStack, YStack } from 'tamagui'
|
||||||
import { v4 as uuidv4 } from 'uuid'
|
import { v4 as uuidv4 } from 'uuid'
|
||||||
|
@ -13,6 +13,10 @@ type GenerateIdProps = {
|
||||||
const GenerateId = ({ isAwaitingPairing }: GenerateIdProps) => {
|
const GenerateId = ({ isAwaitingPairing }: GenerateIdProps) => {
|
||||||
const [generatedId, setGeneratedId] = useState('')
|
const [generatedId, setGeneratedId] = useState('')
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
generateIdHandler()
|
||||||
|
}, [])
|
||||||
|
|
||||||
const generateIdHandler = () => {
|
const generateIdHandler = () => {
|
||||||
setGeneratedId(uuidv4())
|
setGeneratedId(uuidv4())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue