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

567 B
Raw Blame
import {useQuery} from "@tanstack/react-query";
import {accountSsoClient} from "../api/accountSso.client.ts";
import {IdParam} from "../../../types.ts";

export const GET_SSO_ENFORCEMENT_PREVIEW_QUERY_KEY = 'getSsoEnforcementPreview';

export const useGetSsoEnforcementPreview = (accountId: IdParam | undefined, enabled = true) => {
    return useQuery({
        queryKey: [GET_SSO_ENFORCEMENT_PREVIEW_QUERY_KEY, String(accountId)],
        queryFn: () => accountSsoClient.enforcementPreview(accountId as IdParam),
        enabled: enabled && !!accountId,
    });
};