import { useLocale } from "@calcom/lib/hooks/useLocale"; import showToast from "@calcom/lib/notification"; import { trpc } from "@calcom/trpc/react"; import Badge from "@calcom/ui/Badge"; import Button from "@calcom/ui/Button"; /** @deprecated Use `packages/features/ee/teams/components/DisableTeamImpersonation.tsx` */ const DisableTeamImpersonation = ({ teamId, memberId }: { teamId: number; memberId: number }) => { const { t } = useLocale(); const utils = trpc.useContext(); const query = trpc.useQuery(["viewer.teams.getMembershipbyUser", { teamId, memberId }]); const mutation = trpc.useMutation("viewer.teams.updateMembership", { onSuccess: async () => { showToast(t("your_user_profile_updated_successfully"), "success"); await utils.invalidateQueries(["viewer.teams.getMembershipbyUser"]); }, async onSettled() { await utils.invalidateQueries(["viewer.public.i18n"]); }, }); if (query.isLoading) return <>>; return ( <>
{t("team_impersonation_description")}