mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-09 10:03:36 +00:00
fix: remove add val count handler
This commit is contained in:
parent
e2cd19f4db
commit
111ab75cb2
@ -14,7 +14,6 @@ type Story = StoryObj<typeof meta>
|
||||
export const Default: Story = {
|
||||
args: {
|
||||
validatorCount: 2,
|
||||
addValidatorHandler: () => {},
|
||||
changeValidatorCountHandler: () => {},
|
||||
},
|
||||
}
|
||||
@ -22,7 +21,6 @@ export const Default: Story = {
|
||||
export const WithoutValidatorCount: Story = {
|
||||
args: {
|
||||
validatorCount: 0,
|
||||
addValidatorHandler: () => {},
|
||||
changeValidatorCountHandler: () => {},
|
||||
},
|
||||
}
|
||||
@ -30,7 +28,6 @@ export const WithoutValidatorCount: Story = {
|
||||
export const WithLongValidatorCount: Story = {
|
||||
args: {
|
||||
validatorCount: 2000,
|
||||
addValidatorHandler: () => {},
|
||||
changeValidatorCountHandler: () => {},
|
||||
},
|
||||
}
|
||||
|
@ -9,13 +9,11 @@ import CurrencyDropdown from './CurrencyDropdown'
|
||||
|
||||
type ValidatorsMenuWithPriceProps = {
|
||||
validatorCount: number
|
||||
addValidatorHandler: () => void
|
||||
changeValidatorCountHandler: (value: string) => void
|
||||
}
|
||||
|
||||
const ValidatorsMenuWithPrice = ({
|
||||
validatorCount,
|
||||
addValidatorHandler,
|
||||
changeValidatorCountHandler,
|
||||
}: ValidatorsMenuWithPriceProps) => {
|
||||
const [currency, setCurrency] = useState(CURRENCIES[0])
|
||||
@ -31,7 +29,13 @@ const ValidatorsMenuWithPrice = ({
|
||||
<Stack space={'$2'}>
|
||||
<DepositSubtitle />
|
||||
<Input
|
||||
icon={<AddIcon size={16} style={{ cursor: 'pointer' }} onClick={addValidatorHandler} />}
|
||||
icon={
|
||||
<AddIcon
|
||||
size={16}
|
||||
style={{ cursor: 'pointer' }}
|
||||
onClick={() => changeValidatorCountHandler((validatorCount + 1).toString())}
|
||||
/>
|
||||
}
|
||||
style={{ fontWeight: 'bold' }}
|
||||
value={validatorCount.toString()}
|
||||
onChangeText={changeValidatorCountHandler}
|
||||
|
@ -18,10 +18,6 @@ const Deposit = () => {
|
||||
const { isWalletConnected } = useSelector((state: RootState) => state.deposit)
|
||||
const isTransactionConfirmation = false
|
||||
|
||||
const addValidatorHandler = () => {
|
||||
setValidatorCount((state: number) => state + 1)
|
||||
}
|
||||
|
||||
const changeValidatorCountHandler = (value: string) => {
|
||||
const numberValue = Number(value)
|
||||
if (!isNaN(numberValue)) {
|
||||
@ -44,7 +40,6 @@ const Deposit = () => {
|
||||
) : (
|
||||
<ValidatorsMenuWithPrice
|
||||
validatorCount={validatorCount}
|
||||
addValidatorHandler={addValidatorHandler}
|
||||
changeValidatorCountHandler={changeValidatorCountHandler}
|
||||
/>
|
||||
)}
|
||||
|
Loading…
x
Reference in New Issue
Block a user