mirror of
https://github.com/makeplane/plane
synced 2025-08-07 19:59:33 +00:00
fix: spliting out the project members from project store and service (#2739)
This commit is contained in:
committed by
GitHub
parent
7676aab773
commit
79df59f618
@@ -1,7 +1,7 @@
|
||||
import { useRouter } from "next/router";
|
||||
import useSWR from "swr";
|
||||
// services
|
||||
import { ProjectService } from "services/project";
|
||||
import { ProjectMemberService } from "services/project";
|
||||
// ui
|
||||
import { Avatar, AvatarGroup, CustomSearchSelect, UserGroupIcon } from "@plane/ui";
|
||||
// fetch-keys
|
||||
@@ -13,7 +13,7 @@ export type Props = {
|
||||
onChange: (value: string[]) => void;
|
||||
};
|
||||
|
||||
const projectService = new ProjectService();
|
||||
const projectMemberService = new ProjectMemberService();
|
||||
|
||||
export const IssueAssigneeSelect: React.FC<Props> = ({ projectId, value = [], onChange }) => {
|
||||
const router = useRouter();
|
||||
@@ -22,7 +22,7 @@ export const IssueAssigneeSelect: React.FC<Props> = ({ projectId, value = [], on
|
||||
const { data: members } = useSWR(
|
||||
workspaceSlug && projectId ? PROJECT_MEMBERS(projectId as string) : null,
|
||||
workspaceSlug && projectId
|
||||
? () => projectService.fetchProjectMembers(workspaceSlug as string, projectId as string)
|
||||
? () => projectMemberService.fetchProjectMembers(workspaceSlug as string, projectId as string)
|
||||
: null
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user