@scayle/storefront-nuxt
Version:
Nuxt integration for the SCAYLE Commerce Engine and Storefront API
21 lines (20 loc) • 439 B
JavaScript
import { useRpc } from "./useRpc.js";
import { extendPromise } from "../../utils/promise.js";
export function useIDP(params = {}, key) {
const useRpcPromise = useRpc(
"getExternalIdpRedirect",
key ?? "useIDP",
params
);
const { data, error, refresh, status } = useRpcPromise;
return extendPromise(
useRpcPromise.then(() => ({})),
{
data,
fetch,
error,
refresh,
status
}
);
}