UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

32 lines (31 loc) 738 B
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