import { FC } from "react"; // react-hook-form import { UseFormWatch } from "react-hook-form"; // ui import { PrimaryButton, SecondaryButton } from "components/ui"; // types import { IUserDetails, SingleUserSelect, TFormValues, TIntegrationSteps, } from "components/integration"; type Props = { handleStepChange: (value: TIntegrationSteps) => void; users: IUserDetails[]; setUsers: React.Dispatch>; watch: UseFormWatch; }; export const GithubImportUsers: FC = ({ handleStepChange, users, setUsers, watch }) => { const isInvalid = users.filter((u) => u.import !== false && u.email === "").length > 0; return (
Name
Import as...
{users.filter((u) => u.import !== false).length} users selected
{watch("collaborators").map((collaborator, index) => ( ))}
handleStepChange("repo-details")}>Back handleStepChange("import-confirm")} disabled={isInvalid}> Next
); };