UNPKG

@coko/client

Version:

Client side common code for coko apps

34 lines (33 loc) 1.35 kB
import { noop as e } from "../toolkit/funcs.js"; import { CurrentUserQueryContext as t } from "../helpers/useCurrentUser.js"; import { SubscriptionManagerProvider as n } from "../helpers/subscriptionManagerContext.js"; import r from "./AntConfigProvider.js"; import { makeApolloClient as i } from "../helpers/makeApolloClient.js"; import a from "./GlobalStyle.js"; import { useMemo as o } from "react"; import { BrowserRouter as s } from "react-router"; import { ThemeProvider as c } from "styled-components"; import { ApolloProvider as l } from "@apollo/client/react"; import { loadDevMessages as u, loadErrorMessages as d } from "@apollo/client/dev"; import { jsx as f, jsxs as p } from "react/jsx-runtime"; //#region src/components/Root.tsx process.env.NODE_ENV !== "production" && (u(), d()); var m = ({ currentUserQuery: u, onLogout: d = e, makeApolloConfig: m, routes: h, theme: g, notification: _ }) => /* @__PURE__ */ f(l, { client: o(() => i(m), [m]), children: /* @__PURE__ */ f(n, { children: /* @__PURE__ */ f(s, { children: /* @__PURE__ */ f(t.Provider, { value: { currentUserQuery: u, onLogout: d }, children: /* @__PURE__ */ f(r, { notification: _, theme: g, children: /* @__PURE__ */ p(c, { theme: g, children: [/* @__PURE__ */ f(a, {}), h] }) }) }) }) }) }); //#endregion export { m as default };