diff --git a/packages/gatsby-theme-aio/package.json b/packages/gatsby-theme-aio/package.json index fecb376092..e692b91494 100644 --- a/packages/gatsby-theme-aio/package.json +++ b/packages/gatsby-theme-aio/package.json @@ -1,6 +1,6 @@ { "name": "@adobe/gatsby-theme-aio", - "version": "4.11.16", + "version": "4.11.16-rc2", "description": "The Adobe I/O theme for building markdown powered sites", "main": "index.js", "license": "Apache-2.0", diff --git a/packages/gatsby-theme-aio/src/components/RedoclyAPIBlock/index.js b/packages/gatsby-theme-aio/src/components/RedoclyAPIBlock/index.js index f388b1c19b..05dcd04f5e 100644 --- a/packages/gatsby-theme-aio/src/components/RedoclyAPIBlock/index.js +++ b/packages/gatsby-theme-aio/src/components/RedoclyAPIBlock/index.js @@ -28,7 +28,7 @@ const RedoclyAPIBlock = ({ hideTryItPanel = false, jsonSampleExpandLevel = 2, generateCodeSamples = 'languages: [], skipOptionalParameters: false,', - requestInterceptor = '', + requestInterceptorSrc = '', }) => { const [isRedoclyLoading, setIsRedoclyLoading] = useState(true); @@ -39,6 +39,11 @@ const RedoclyAPIBlock = ({ input.spec = withPrefix(src); } + console.log('~~ 1'); + import(requestInterceptorSrc).then((mod) => { + console.log('~~ 2', mod); + }); + useEffect(() => { let script = document.createElement('script') script.setAttribute('src', 'https://cdn.redoc.ly/reference-docs/latest/redocly-reference-docs.min.js'); @@ -70,7 +75,6 @@ const RedoclyAPIBlock = ({ hideTryItPanel: ${hideTryItPanel}, jsonSampleExpandLevel: ${jsonSampleExpandLevel === all ? `'${jsonSampleExpandLevel}'` : jsonSampleExpandLevel}, ${generateCodeSamples ? "generateCodeSamples: { " + generateCodeSamples + "}," : ''} - ${requestInterceptor ? "requestInterceptor: " + requestInterceptor + "," : ''} hideLoading: true, theme: { ${typography ? "typography: { " + typography + "}," : ''} @@ -102,7 +106,7 @@ RedoclyAPIBlock.propTypes = { PropTypes.number, ]), generateCodeSamples: PropTypes.string, - requestInterceptor: PropTypes.string, + requestInterceptorSrc: PropTypes.string, }; export { RedoclyAPIBlock }; \ No newline at end of file