@adyen/kyc-components
Version:
This guide assumes that you have already an account with Adyen. A legalEntity needs to be created, and you need to have a `legalEntityId` to instatiate a Component.
24 lines (23 loc) • 1.06 kB
JavaScript
try {
let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "a95369ec-afd2-4d7a-bd04-250b4e6e0c0d", e._sentryDebugIdIdentifier = "sentry-dbid-a95369ec-afd2-4d7a-bd04-250b4e6e0c0d");
} catch (e) {}
import { n as httpGet, s as useApiContext } from "./http-D1NDkBxF.js";
import { useQuery } from "@tanstack/preact-query";
//#region src/api/onboardingStatus/useOnboardingStatus.ts
var getOnboardingStatus = async (legalEntityId, baseUrl) => {
return httpGet({
baseUrl,
path: `legalEntities/${legalEntityId}/onboardingStatus`
});
};
var useOnboardingStatus = (options) => {
const { rootLegalEntityId, baseUrl } = useApiContext();
return useQuery({
queryKey: ["onboardingStatus"],
queryFn: () => getOnboardingStatus(rootLegalEntityId.value, baseUrl.value),
...options
});
};
//#endregion
export { useOnboardingStatus as t };