diff --git a/src/pages/ValidatorOnboarding/ClientSetup/SetupRow.tsx b/src/pages/ValidatorOnboarding/ClientSetup/SetupRow.tsx index ecd792ea..d958a09b 100644 --- a/src/pages/ValidatorOnboarding/ClientSetup/SetupRow.tsx +++ b/src/pages/ValidatorOnboarding/ClientSetup/SetupRow.tsx @@ -1,12 +1,25 @@ import { Stack, XStack, YStack } from 'tamagui' import { Input as StatusInput, Text } from '@status-im/components' import { AddIcon, ChevronDownIcon } from '@status-im/icons' +import { useState } from 'react' type SetupRowProps = { title: string } const SetupRow = ({ title }: SetupRowProps) => { + const [validatorCount, setValidatorCount] = useState(0) + + const addValidatorHandler = () => { + setValidatorCount((state: number) => state + 1) + } + + const changeValidatorCountHandler = (e: any) => { + if (!isNaN(e.target.value)) { + setValidatorCount(Number(e.target.value)) + } + } + return ( @@ -17,7 +30,11 @@ const SetupRow = ({ title }: SetupRowProps) => { How many Validators would you like to run? - } /> + } + value={validatorCount.toString()} + onChange={changeValidatorCountHandler} + />