Overview of all the hooks associated with teams.
useTeams
import { useTeams } from "@calcom/atoms"; export default function UserTeams() { const { data: teams, isLoading: isLoadingTeams } = useTeams(); return ( <> {isLoadingTeams && <p>Loading...</p>} {!isLoadingTeams && !teams && <p>No teams found</p>} {!isLoadingTeams && teams && (Boolean(teams?.length)) && teams?.map((team) => { return ( <div key={team.id}><h1>Team name: {team.name}</h1></div> ); })} </> ); }
Was this page helpful?