synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
32 lines (31 loc) • 738 B
JavaScript
import { jsx as u } from "react/jsx-runtime";
import { createContext as s, useContext as o } from "react";
const e = s(void 0);
function h(t) {
const {
children: r,
apiBasePath: n = "https://gateway.westeurope.dap.c-path.org",
authenticationRequest: i
} = t, a = {
apiBasePath: n,
authenticationRequest: i
};
return /* @__PURE__ */ u(e.Provider, { value: a, children: r });
}
function x() {
const t = o(e);
if (!t)
throw new Error(
"useAridhiaContext must be used within an AridhiaContextProvider"
);
return t;
}
function p() {
return o(e);
}
export {
h as AridhiaContextProvider,
x as useAridhiaContext,
p as useAridhiaContextOptional
};
//# sourceMappingURL=AridhiaContext.js.map