import { useState, useMemo } from "react"; import { WEBAPP_URL, APP_NAME } from "@calcom/lib/constants"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import { Alert, Button, ButtonGroup, Label } from "@calcom/ui"; import { Users, RefreshCcw, UserPlus, Mail, Video, EyeOff } from "@calcom/ui/components/icon"; import { UpgradeTip } from "../../../tips"; import SkeletonLoaderTeamList from "./SkeletonloaderTeamList"; import TeamList from "./TeamList"; export function TeamsListing() { const { t } = useLocale(); const [errorMessage, setErrorMessage] = useState(""); const { data, isLoading } = trpc.viewer.teams.list.useQuery(undefined, { onError: (e) => { setErrorMessage(e.message); }, }); const teams = useMemo(() => data?.filter((m) => m.accepted) || [], [data]); const invites = useMemo(() => data?.filter((m) => !m.accepted) || [], [data]); const features = [ { icon: , title: t("collective_scheduling"), description: t("make_it_easy_to_book"), }, { icon: , title: t("round_robin"), description: t("find_the_best_person"), }, { icon: , title: t("fixed_round_robin"), description: t("add_one_fixed_attendee"), }, { icon: , title: t("sms_attendee_action"), description: t("make_it_easy_to_book"), }, { icon: