mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-03 07:03:30 +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 Validators from './Validators'
|
||||
import ValidatorsMenuWithPrice from './ValidatorsMenuWithPrice'
|
||||
|
||||
const meta = {
|
||||
title: 'General/Validators',
|
||||
component: Validators,
|
||||
title: 'General/ValidatorsMenuWithPrice',
|
||||
component: ValidatorsMenuWithPrice,
|
||||
tags: ['autodocs'],
|
||||
} satisfies Meta<typeof Validators>
|
||||
} satisfies Meta<typeof ValidatorsMenuWithPrice>
|
||||
|
||||
export default 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 CurrencyDropdown from './CurrencyDropdown'
|
||||
|
||||
type ValidatorsProps = {
|
||||
type ValidatorsMenuWithPriceProps = {
|
||||
validatorCount: number
|
||||
addValidatorHandler: () => void
|
||||
changeValidatorCountHandler: (value: string) => void
|
||||
}
|
||||
|
||||
const Validators = ({
|
||||
const ValidatorsMenuWithPrice = ({
|
||||
validatorCount,
|
||||
addValidatorHandler,
|
||||
changeValidatorCountHandler,
|
||||
}: ValidatorsProps) => {
|
||||
}: ValidatorsMenuWithPriceProps) => {
|
||||
const [currency, setCurrency] = useState(CURRENCIES[0])
|
||||
|
||||
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 ValidatorRequest from './ValidatorRequest'
|
||||
import Validators from '../../../components/General/Validators'
|
||||
import ValidatorsMenuWithPrice from '../../../components/General/ValidatorsMenuWithPrice'
|
||||
import ConnectWallet from './ConnectWallet'
|
||||
import ConnectedWallet from './ConnectedWallet'
|
||||
import DepositTitle from './DepositTitle'
|
||||
@ -42,7 +42,7 @@ const Deposit = () => {
|
||||
{isTransactionConfirmation ? (
|
||||
<DepositSubtitle />
|
||||
) : (
|
||||
<Validators
|
||||
<ValidatorsMenuWithPrice
|
||||
validatorCount={validatorCount}
|
||||
addValidatorHandler={addValidatorHandler}
|
||||
changeValidatorCountHandler={changeValidatorCountHandler}
|
||||
|
Loading…
x
Reference in New Issue
Block a user