diff --git a/apps/app/components/integration/github/import-users.tsx b/apps/app/components/integration/github/import-users.tsx index db6b255a0..c1c790396 100644 --- a/apps/app/components/integration/github/import-users.tsx +++ b/apps/app/components/integration/github/import-users.tsx @@ -1,7 +1,5 @@ import { FC } from "react"; -import { useRouter } from "next/router"; - // react-hook-form import { UseFormWatch } from "react-hook-form"; // ui @@ -22,8 +20,6 @@ type Props = { }; export const GithubImportUsers: FC = ({ handleStepChange, users, setUsers, watch }) => { - const router = useRouter(); - const isInvalid = users.filter((u) => u.import !== false && u.email === "").length > 0; return ( @@ -44,7 +40,6 @@ export const GithubImportUsers: FC = ({ handleStepChange, users, setUsers index={index} users={users} setUsers={setUsers} - project={watch("project")} /> ))} diff --git a/apps/app/components/integration/github/single-user-select.tsx b/apps/app/components/integration/github/single-user-select.tsx index e478d119b..ffb67d728 100644 --- a/apps/app/components/integration/github/single-user-select.tsx +++ b/apps/app/components/integration/github/single-user-select.tsx @@ -4,21 +4,20 @@ import { useRouter } from "next/router"; import useSWR from "swr"; // services -import projectService from "services/project.service"; +import workspaceService from "services/workspace.service"; // ui import { Avatar, CustomSearchSelect, CustomSelect, Input } from "components/ui"; // types import { IGithubRepoCollaborator } from "types"; import { IUserDetails } from "./root"; // fetch-keys -import { PROJECT_MEMBERS } from "constants/fetch-keys"; +import { WORKSPACE_MEMBERS } from "constants/fetch-keys"; type Props = { collaborator: IGithubRepoCollaborator; index: number; users: IUserDetails[]; setUsers: React.Dispatch>; - project: string | null; }; const importOptions = [ @@ -36,21 +35,13 @@ const importOptions = [ }, ]; -export const SingleUserSelect: React.FC = ({ - collaborator, - index, - users, - setUsers, - project, -}) => { +export const SingleUserSelect: React.FC = ({ collaborator, index, users, setUsers }) => { const router = useRouter(); const { workspaceSlug } = router.query; const { data: members } = useSWR( - workspaceSlug && project ? PROJECT_MEMBERS(project) : null, - workspaceSlug && project - ? () => projectService.projectMembers(workspaceSlug as string, project) - : null + workspaceSlug ? WORKSPACE_MEMBERS(workspaceSlug.toString()) : null, + workspaceSlug ? () => workspaceService.workspaceMembers(workspaceSlug.toString()) : null ); const options =