import type { FC } from 'react'; import { useForm } from 'react-hook-form'; import { createCertificateAction, type CreateCertificateDTO } from '../../duck'; import { useAppDispatch } from '../../../../common/hooks'; export const CreateCertificate: FC = () => { const { handleSubmit, register, reset } = useForm(); const dispatch = useAppDispatch(); const onSubmit = (values: CreateCertificateDTO) => { dispatch(createCertificateAction(values)).then(() => { reset(); }); }; return (
); };