UNPKG

@redocly/graphql-docs

Version:

Redocly GraphQL docs

2 lines (1 loc) 1.2 kB
import{jsx as r,jsxs as p}from"react/jsx-runtime";import{ThreePanelLayout as h}from"@redocly/theme";import"./polyfills.js";import{IS_BROWSER as l}from"./common/utils/is-browser.js";import{Box as d}from"./common/index.js";import{AppProviders as t}from"./app/index.js";import{DocsContent as f}from"./definition/index.js";import{AppRouter as u}from"./navigation/index.js";import{useGraphqlSchema as y}from"./schema/index.js";import{Sidebar as L}from"./sidebar/index.js";import{GraphQLDocsWrapper as g}from"./styled.js";import{useLicenseKey as x}from"../shared/license/use-license-key.js";import{useSettings as S}from"./settings/index.js";function n(){const{layout:e}=S();return r(h,{layout:e,children:p(g,{children:[r(L,{}),r(f,{})]})})}function V({settings:e,withCommonStyles:o,...s}){const{schema:i,loading:m}=y(s.schema),{isValid:c,loading:a}=x(e?.licenseKey);return m||a?r("div",{children:"Loading..."}):c?l?r(t,{schema:i,settings:e,withCommonStyles:o,children:r(u,{children:r(n,{})})}):r(t,{schema:i,settings:e,withCommonStyles:o,children:r(n,{})}):r(d,{style:{height:"100vh"},align:"center",justify:"center",children:r("div",{children:"Invalid License Key"})})}export{V as RedoclyGraphQLDocs};