import { api } from "@/lib/api"; import { useQuery } from "@tanstack/react-query"; export type MeResponse = { id: number; name: string; email?: string | null; profile?: { bio?: string | null; avatarUrl?: string | null }; }; export function useMe() { return useQuery({ queryKey: ["me"], queryFn: async (): Promise => { const res = await api.get("/auth/me"); return res.data; }, }); }