mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-03 15:13:38 +00:00
feat: change name to be more understandable
This commit is contained in:
parent
e82051332f
commit
e2cd19f4db
@ -1,12 +1,12 @@
|
|||||||
import type { Meta, StoryObj } from '@storybook/react'
|
import type { Meta, StoryObj } from '@storybook/react'
|
||||||
|
|
||||||
import Validators from './Validators'
|
import ValidatorsMenuWithPrice from './ValidatorsMenuWithPrice'
|
||||||
|
|
||||||
const meta = {
|
const meta = {
|
||||||
title: 'General/Validators',
|
title: 'General/ValidatorsMenuWithPrice',
|
||||||
component: Validators,
|
component: ValidatorsMenuWithPrice,
|
||||||
tags: ['autodocs'],
|
tags: ['autodocs'],
|
||||||
} satisfies Meta<typeof Validators>
|
} satisfies Meta<typeof ValidatorsMenuWithPrice>
|
||||||
|
|
||||||
export default meta
|
export default meta
|
||||||
type Story = StoryObj<typeof meta>
|
type Story = StoryObj<typeof meta>
|
@ -7,17 +7,17 @@ import DepositSubtitle from '../../pages/ValidatorOnboarding/Deposit/DepositSubt
|
|||||||
import { CURRENCIES, ETH_PER_VALIDATOR } from '../../constants'
|
import { CURRENCIES, ETH_PER_VALIDATOR } from '../../constants'
|
||||||
import CurrencyDropdown from './CurrencyDropdown'
|
import CurrencyDropdown from './CurrencyDropdown'
|
||||||
|
|
||||||
type ValidatorsProps = {
|
type ValidatorsMenuWithPriceProps = {
|
||||||
validatorCount: number
|
validatorCount: number
|
||||||
addValidatorHandler: () => void
|
addValidatorHandler: () => void
|
||||||
changeValidatorCountHandler: (value: string) => void
|
changeValidatorCountHandler: (value: string) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
const Validators = ({
|
const ValidatorsMenuWithPrice = ({
|
||||||
validatorCount,
|
validatorCount,
|
||||||
addValidatorHandler,
|
addValidatorHandler,
|
||||||
changeValidatorCountHandler,
|
changeValidatorCountHandler,
|
||||||
}: ValidatorsProps) => {
|
}: ValidatorsMenuWithPriceProps) => {
|
||||||
const [currency, setCurrency] = useState(CURRENCIES[0])
|
const [currency, setCurrency] = useState(CURRENCIES[0])
|
||||||
|
|
||||||
const totalPrice = (validatorCount * currency.price).toFixed(2)
|
const totalPrice = (validatorCount * currency.price).toFixed(2)
|
||||||
@ -61,4 +61,4 @@ const Validators = ({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Validators
|
export default ValidatorsMenuWithPrice
|
@ -5,7 +5,7 @@ import { useState } from 'react'
|
|||||||
import { useSelector } from 'react-redux'
|
import { useSelector } from 'react-redux'
|
||||||
|
|
||||||
import ValidatorRequest from './ValidatorRequest'
|
import ValidatorRequest from './ValidatorRequest'
|
||||||
import Validators from '../../../components/General/Validators'
|
import ValidatorsMenuWithPrice from '../../../components/General/ValidatorsMenuWithPrice'
|
||||||
import ConnectWallet from './ConnectWallet'
|
import ConnectWallet from './ConnectWallet'
|
||||||
import ConnectedWallet from './ConnectedWallet'
|
import ConnectedWallet from './ConnectedWallet'
|
||||||
import DepositTitle from './DepositTitle'
|
import DepositTitle from './DepositTitle'
|
||||||
@ -42,7 +42,7 @@ const Deposit = () => {
|
|||||||
{isTransactionConfirmation ? (
|
{isTransactionConfirmation ? (
|
||||||
<DepositSubtitle />
|
<DepositSubtitle />
|
||||||
) : (
|
) : (
|
||||||
<Validators
|
<ValidatorsMenuWithPrice
|
||||||
validatorCount={validatorCount}
|
validatorCount={validatorCount}
|
||||||
addValidatorHandler={addValidatorHandler}
|
addValidatorHandler={addValidatorHandler}
|
||||||
changeValidatorCountHandler={changeValidatorCountHandler}
|
changeValidatorCountHandler={changeValidatorCountHandler}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user