import React from "react"; // swr import useSWR from "swr"; // react hook form import { Controller } from "react-hook-form"; // service import projectServices from "lib/services/project.service"; // hooks import useUser from "lib/hooks/useUser"; // fetch keys import { PROJECT_MEMBERS } from "constants/fetch-keys"; // types import type { Control } from "react-hook-form"; import type { IIssue, WorkspaceMember } from "types"; import { UserIcon } from "@heroicons/react/24/outline"; import { SearchListbox } from "ui"; type Props = { control: Control; }; const SelectAssignee: React.FC = ({ control }) => { const { activeWorkspace, activeProject } = useUser(); const { data: people } = useSWR( activeWorkspace && activeProject ? PROJECT_MEMBERS(activeProject.id) : null, activeWorkspace && activeProject ? () => projectServices.projectMembers(activeWorkspace.slug, activeProject.id) : null ); return ( ( { return { value: person.member.id, display: person.member.first_name }; })} multiple={true} value={value} onChange={onChange} icon={} /> )} > ); }; export default SelectAssignee;