> ## Documentation Index
> Fetch the complete documentation index at: https://cal.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# User / Teams hooks

> Overview of all the hooks associated with managed users or teams.

> [!WARNING]
>
> This is now deprecated and under maintenance for existing users only - no new customers can sign up for the platform plan

### 1. `useMe`

The useMe returns the current managed user's info. This hook is useful when you need to display a managed user's details.

Below code snippet shows how to use the useMe hook to fetch user details.

```js theme={null}
import { useMe } from "@calcom/atoms";

export default function UserDetails() {
  const { data: userData, isLoading: isLoadingUser } = useMe();

  return (
    <>
      {isLoadingUser && <p>Loading...</p>}
      {!isLoadingUser && !userData && <p>No user found</p>}
      {!isLoadingUser &&
        !!userData &&
        return (
          <div>Username: {userData.username}</div>
        )
      }
    </>
  );
}
```

### 2. `useTeams`

The useTeams returns all teams info. This hook is useful when you need to display or manage a user's entire collection of teams.

Below code snippet shows how to use the useTeams hook to fetch team details.

```js theme={null}
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>
            );
       })}
    </>
  );
}
```

***

> **[Previous: Calendars Hooks](https://cal.com/docs/platform/calendars-hooks)**
>
> Hooks for calendars

> **[Next: Booking Redirects](https://cal.com/docs/platform/guides/booking-redirects)**
>
> Manage booking flow


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.