Branchwell

Become a Pro / website · becomeapro.ai / src / lib / use-user.ts

Raw 208 B on f63bc385c0fa362af985bfb576a8b5aa2a3df60f
1"use client";
2
3import { authClient } from "@/lib/auth-client";
4
5export function useUser() {
6 const { data, isPending } = authClient.useSession();
7 return { user: data?.user ?? null, loading: isPending };
8}