import { Suspense, useState } from "react"; import MemberInvitationModal from "@calcom/features/ee/teams/components/MemberInvitationModal"; import { classNames } from "@calcom/lib"; import { WEBAPP_URL } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import { Icon } from "@calcom/ui"; import { Avatar } from "@calcom/ui/components/avatar"; import { Badge } from "@calcom/ui/components/badge"; import { Button } from "@calcom/ui/components/button"; import { SkeletonContainer, SkeletonText } from "@calcom/ui/v2/core/skeleton"; const AddNewTeamMemberSkeleton = () => { return (

); }; const AddNewTeamMembers = (props: { teamId: number }) => { const { t } = useLocale(); const utils = trpc.useContext(); const { data: team, isLoading } = trpc.useQuery(["viewer.teams.get", { teamId: props.teamId }]); const removeMemberMutation = trpc.useMutation("viewer.teams.removeMember", { onSuccess() { utils.invalidateQueries(["viewer.teams.get", { teamId: props.teamId }]); utils.invalidateQueries(["viewer.teams.list"]); }, }); const [memberInviteModal, setMemberInviteModal] = useState(false); if (isLoading) return ; return ( }> <> <> {team && ( setMemberInviteModal(false)} team={team} currentMember={team?.membership.role} /> )}
); }; export default AddNewTeamMembers;