diff --git a/src/pages/PairDevice/GenerateId.tsx b/src/pages/PairDevice/GenerateId.tsx new file mode 100644 index 00000000..283ca949 --- /dev/null +++ b/src/pages/PairDevice/GenerateId.tsx @@ -0,0 +1,65 @@ +import { Button, Input, Text as StatusText } from '@status-im/components' +import { CompleteIdIcon, CopyIcon } from '@status-im/icons' +import { Text } from '@tamagui/web' +import { useState } from 'react' +import { Link } from 'react-router-dom' +import { XStack, YStack } from 'tamagui' +import { v4 as uuidv4 } from 'uuid' + +type GenerateIdProps = { + isAwaitingPairing: boolean +} + +const GenerateId = ({ isAwaitingPairing }: GenerateIdProps) => { + const [generatedId, setGeneratedId] = useState('') + + const generateIdHandler = () => { + setGeneratedId(uuidv4()) + } + + const copyGeneratedIdHandler = () => { + navigator.clipboard.writeText(generatedId) + } + + return ( + + + + Pair with Command line + + + + + + Generated Pairing ID Input + + '} + icon={ + + } + value={generatedId} + error={isAwaitingPairing} + /> + + + Please execute the following command with your randomly generated pairing id on the machine + where the Nimbus Service is running.{' '} + Learn how with our + + Documentation + + . + + + ) +} + +export default GenerateId