'use client' import { Dispatch, SetStateAction, useRef, useState } from 'react' import styles from './InputAmount.module.css' export function InputAmount({ amount, setAmount }: { amount: number setAmount: Dispatch> }) { function handleChange(e: React.ChangeEvent) { const { value } = e.target if (value === '') { setAmount(0) } else { setAmount(Number(value)) } } return ( ) }