"use client";

import IUser from "@/interfaces/IUser";
import { useApi } from "./use-api";

export default function useMe() {
	const {
		data: user,
		isLoading,
		mutate,
		error,
		success,
	} = useApi<IUser>("/users/me", undefined, true);

	return { user, isLoading, success, error, mutate };
}
