import crypto from 'crypto'; import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { faMinus, faPlus, faShuffle } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Button, Input } from '@app/components/v2'; type Props = { onGenerate: (val: string) => void; }; export const GenRandomNumber = ({ onGenerate }: Props) => { const { t } = useTranslation(); const [value, setValue] = useState(32); const onGenerateRandomHex = () => { const rand = crypto.randomBytes(value).toString('hex'); onGenerate(rand); }; return (