import { Form, Formik } from "formik"; import FormGroup from "../components/FormGroup"; import type { SoundUploadValue } from "../../../types/types"; const SoundUpload = () => { const initialValues: SoundUploadValue = { soundFile: null, }; const handleSubmit = (values: SoundUploadValue) => { console.log(values); }; return ( {({ setFieldValue }) => (
{ if ( e.target.files && e.target.files[0].type.lastIndexOf(".mp3") ) setFieldValue("sightingSound", e.target.files[0]); }} />
)}
); }; export default SoundUpload;