Skip to content

Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️

570 B
Raw Blame
import {useQuery} from "@tanstack/react-query";
import {AccountDeletionStatus} from "../types.ts";
import {accountClient} from "../api/account.client.ts";

export const GET_ACCOUNT_DELETION_STATUS_QUERY_KEY = 'getAccountDeletionStatus';

export const useGetAccountDeletionStatus = (enabled = true) => {
    return useQuery<AccountDeletionStatus>({
        queryKey: [GET_ACCOUNT_DELETION_STATUS_QUERY_KEY],
        enabled,

        queryFn: async () => {
            const {data} = await accountClient.getDeletionStatus();
            return data;
        }
    });
};