import React, { FunctionComponent } from 'react'; import { useFormContext } from 'react-hook-form'; import type { IProjectSelectorProps } from './ProjectSelector.types'; import { DropListPicker, IReportFormValues } from '../../../../components'; export const ProjectSelector: FunctionComponent = ({ options, ...dropListPickerProps }) => { const { setValue, watch, errors } = useFormContext(); return ( setValue('JIRAProject', val)} error={errors.JIRAProject?.message} /> ); };