import { IAccount } from "#entities/account";
import { apiFetch } from "../fetch";

interface IResult {
  props: {
    currentPage: "account";
    title: string;
    account: IAccount;
    notifications_count: number;
  };
}

export async function fetchAccount() {
  const path = "/account";

  const result = await apiFetch<IResult>(path, { method: "GET" });

  return result;
}
