fix: tweaks with types and formatting
This commit is contained in:
parent
8fc74a5580
commit
90d95a245b
|
@ -24,7 +24,7 @@ const ContinueButton = ({
|
|||
)
|
||||
const { isWalletConnected } = useSelector((state: RootState) => state.deposit)
|
||||
|
||||
const isActivationValScreen = activeStep === 3 && subStepValidatorSetup === 3
|
||||
const isActivationValidatorScreen = activeStep === 3 && subStepValidatorSetup === 3
|
||||
|
||||
const isDisabled = () => {
|
||||
const isDepositWalletConnected = isWalletConnected === false && activeStep === 5
|
||||
|
@ -52,7 +52,7 @@ const ContinueButton = ({
|
|||
icon={<CloseCircleIcon size={20} />}
|
||||
/>
|
||||
)}
|
||||
{isActivationValScreen && (
|
||||
{isActivationValidatorScreen && (
|
||||
<LinkWithArrow
|
||||
text="Skip to Dashboard"
|
||||
to="/"
|
||||
|
|
|
@ -24,9 +24,10 @@ const Deposit = () => {
|
|||
setValidatorCount((state: number) => state + 1)
|
||||
}
|
||||
|
||||
const changeValidatorCountHandler = (e: any) => {
|
||||
if (!isNaN(e.target.value)) {
|
||||
setValidatorCount(Number(e.target.value))
|
||||
const changeValidatorCountHandler = (value: string) => {
|
||||
const numberValue = Number(value)
|
||||
if (!isNaN(numberValue)) {
|
||||
setValidatorCount(numberValue)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
import { Input, Text } from '@status-im/components'
|
||||
import { AddIcon, ChevronDownIcon } from '@status-im/icons'
|
||||
import { Stack, XStack, YStack } from 'tamagui'
|
||||
|
||||
import DepositSubtitle from './DepositSubtitle'
|
||||
|
||||
type ValidatorsProps = {
|
||||
validatorCount: number
|
||||
addValidatorHandler: () => void
|
||||
changeValidatorCountHandler: (e: any) => void
|
||||
changeValidatorCountHandler: (value: string) => void
|
||||
}
|
||||
|
||||
const Validators = ({
|
||||
|
@ -22,7 +23,7 @@ const Validators = ({
|
|||
icon={<AddIcon size={16} style={{ cursor: 'pointer' }} onClick={addValidatorHandler} />}
|
||||
style={{ fontWeight: 'bold' }}
|
||||
value={validatorCount.toString()}
|
||||
onChange={changeValidatorCountHandler}
|
||||
onChangeText={changeValidatorCountHandler}
|
||||
/>
|
||||
</Stack>
|
||||
<YStack space={'$2'}>
|
||||
|
|
|
@ -4,6 +4,11 @@ import { useState } from 'react'
|
|||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import wordlist from 'web-bip39/wordlists/english'
|
||||
|
||||
import {
|
||||
setIsCopyPastedPhrase,
|
||||
setValidWords,
|
||||
} from '../../redux/ValidatorOnboarding/KeyGeneration/slice'
|
||||
import { RootState } from '../../redux/store'
|
||||
import FormStepper from './FormStepper/FormStepper'
|
||||
import Titles from '../../components/General/Titles'
|
||||
import Overview from './Overview/Overview'
|
||||
|
@ -16,14 +21,9 @@ import Advisories from './Advisories/Advisories'
|
|||
import ValidatorSetup from './ValidatorSetup/ValidatorSetup/ValidatorSetup'
|
||||
import ValidatorSetupInstall from './ValidatorSetup/ValidatorInstalling/ValidatorInstall'
|
||||
import ContinueButton from './ContinueButton'
|
||||
import {
|
||||
setIsCopyPastedPhrase,
|
||||
setValidWords,
|
||||
} from '../../redux/ValidatorOnboarding/KeyGeneration/slice'
|
||||
import { RootState } from '../../redux/store'
|
||||
import ActivationValidatorSetup from './ValidatorSetup/ValidatorActivation/ActivationValidatorSetup'
|
||||
import './layoutGradient.css'
|
||||
import Deposit from './Deposit/Deposit'
|
||||
import './layoutGradient.css'
|
||||
|
||||
const ValidatorOnboarding = () => {
|
||||
const [activeStep, setActiveStep] = useState(0)
|
||||
|
|
Loading…
Reference in New Issue