Branchwell

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

Raw 208 B on 59dac1cc932d622dfc4d6c274a9ed8e9abcc5e5e
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}