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 ⭐️

498 B
Raw Blame
import {useQuery} from "@tanstack/react-query";
import {TwoFactorStatus} from "../types.ts";
import {twoFactorClient} from "../api/twoFactor.client.ts";

export const GET_TWO_FACTOR_STATUS_QUERY_KEY = 'getTwoFactorStatus';

export const useGetTwoFactorStatus = () => {
    return useQuery<TwoFactorStatus>({
        queryKey: [GET_TWO_FACTOR_STATUS_QUERY_KEY],
        queryFn: async () => {
            const {data} = await twoFactorClient.status();
            return data;
        },
    });
};