refractor: added types to workspace and project services, naming convention
This commit is contained in:
parent
9c33c3c87f
commit
fe7284b9b0
49 changed files with 294 additions and 197 deletions
|
|
@ -20,7 +20,7 @@ import { Button, Select, TextArea } from "ui";
|
|||
import { ChevronDownIcon, CheckIcon } from "@heroicons/react/20/solid";
|
||||
|
||||
// types
|
||||
import { ProjectMember, WorkspaceMember } from "types";
|
||||
import { IProjectMemberInvitation } from "types";
|
||||
|
||||
type Props = {
|
||||
isOpen: boolean;
|
||||
|
|
@ -28,6 +28,11 @@ type Props = {
|
|||
members: any[];
|
||||
};
|
||||
|
||||
type ProjectMember = IProjectMemberInvitation & {
|
||||
member_id: string;
|
||||
user_id: string;
|
||||
};
|
||||
|
||||
const defaultValues: Partial<ProjectMember> = {
|
||||
email: "",
|
||||
message: "",
|
||||
|
|
@ -49,7 +54,7 @@ const SendProjectInvitationModal: React.FC<Props> = ({ isOpen, setIsOpen, member
|
|||
|
||||
const { setToastAlert } = useToast();
|
||||
|
||||
const { data: people } = useSWR<WorkspaceMember[]>(
|
||||
const { data: people } = useSWR(
|
||||
activeWorkspace ? WORKSPACE_MEMBERS(activeWorkspace.slug) : null,
|
||||
activeWorkspace ? () => workspaceService.workspaceMembers(activeWorkspace.slug) : null,
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue