-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-pages-page-2-js-ff05655b650cfee0364c.js.map
1 lines (1 loc) · 4.82 KB
/
component---src-pages-page-2-js-ff05655b650cfee0364c.js.map
1
{"version":3,"sources":["webpack:///./.cache/public-page-renderer.js","webpack:///./.cache/gatsby-browser-entry.js","webpack:///./src/pages/page-2.js","webpack:///./.cache/public-page-renderer-prod.js"],"names":["m","module","exports","require","default","loader","enqueue","React","createContext","SecondPage","title","to","ProdPageRenderer","location","pageResources","createElement","InternalPageRenderer","json"],"mappings":"8EAAA,IAAsBA,EAKpBC,EAAOC,SALaF,EAKWG,EAAQ,UALRH,EAAEI,SAAYJ,G,2HCctBK,UAAOC,QAELC,IAAMC,cAAc,I,4BCDhCC,UATI,kBACjB,YAAC,IAAD,KACE,YAAC,IAAD,CAAKC,MAAM,aACX,iDACA,0CACA,YAAC,IAAD,CAAMC,GAAG,KAAT,8B,wFCWWC,UAjBU,SAAC,GAAiC,IAA/BC,EAA8B,EAA9BA,SAAUC,EAAoB,EAApBA,cACpC,OAAKA,EAGEP,IAAMQ,cAAcC,IAApB,eACLH,WACAC,iBACGA,EAAcG,OALV","file":"component---src-pages-page-2-js-ff05655b650cfee0364c.js","sourcesContent":["const preferDefault = m => (m && m.default) || m\n\nif (process.env.BUILD_STAGE === `develop`) {\n module.exports = preferDefault(require(`./public-page-renderer-dev`))\n} else if (process.env.BUILD_STAGE === `build-javascript`) {\n module.exports = preferDefault(require(`./public-page-renderer-prod`))\n} else {\n module.exports = () => null\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport Link, {\n withPrefix,\n withAssetPrefix,\n navigate,\n push,\n replace,\n navigateTo,\n parsePath,\n} from \"gatsby-link\"\nimport PageRenderer from \"./public-page-renderer\"\nimport loader from \"./loader\"\n\nconst prefetchPathname = loader.enqueue\n\nconst StaticQueryContext = React.createContext({})\n\nfunction StaticQueryDataRenderer({ staticQueryData, data, query, render }) {\n const finalData = data\n ? data.data\n : staticQueryData[query] && staticQueryData[query].data\n\n return (\n <React.Fragment>\n {finalData && render(finalData)}\n {!finalData && <div>Loading (StaticQuery)</div>}\n </React.Fragment>\n )\n}\n\nconst StaticQuery = props => {\n const { data, query, render, children } = props\n\n return (\n <StaticQueryContext.Consumer>\n {staticQueryData => (\n <StaticQueryDataRenderer\n data={data}\n query={query}\n render={render || children}\n staticQueryData={staticQueryData}\n />\n )}\n </StaticQueryContext.Consumer>\n )\n}\n\nconst useStaticQuery = query => {\n if (\n typeof React.useContext !== `function` &&\n process.env.NODE_ENV === `development`\n ) {\n throw new Error(\n `You're likely using a version of React that doesn't support Hooks\\n` +\n `Please update React and ReactDOM to 16.8.0 or later to use the useStaticQuery hook.`\n )\n }\n const context = React.useContext(StaticQueryContext)\n if (context[query] && context[query].data) {\n return context[query].data\n } else {\n throw new Error(\n `The result of this StaticQuery could not be fetched.\\n\\n` +\n `This is likely a bug in Gatsby and if refreshing the page does not fix it, ` +\n `please open an issue in https://github.com/gatsbyjs/gatsby/issues`\n )\n }\n}\n\nStaticQuery.propTypes = {\n data: PropTypes.object,\n query: PropTypes.string.isRequired,\n render: PropTypes.func,\n children: PropTypes.func,\n}\n\nfunction graphql() {\n throw new Error(\n `It appears like Gatsby is misconfigured. Gatsby related \\`graphql\\` calls ` +\n `are supposed to only be evaluated at compile time, and then compiled away. ` +\n `Unfortunately, something went wrong and the query was left in the compiled code.\\n\\n` +\n `Unless your site has a complex or custom babel/Gatsby configuration this is likely a bug in Gatsby.`\n )\n}\n\nexport {\n Link,\n withAssetPrefix,\n withPrefix,\n graphql,\n parsePath,\n navigate,\n push, // TODO replace for v3\n replace, // TODO remove replace for v3\n navigateTo, // TODO: remove navigateTo for v3\n StaticQueryContext,\n StaticQuery,\n PageRenderer,\n useStaticQuery,\n prefetchPathname,\n}\n","import React from \"react\"\nimport { Link } from \"gatsby\"\n\nimport Layout from \"../components/layout\"\nimport SEO from \"../components/seo\"\n\nconst SecondPage = () => (\n <Layout>\n <SEO title=\"Page two\" />\n <h1>Hi from the second page</h1>\n <p>Welcome to page 2</p>\n <Link to=\"/\">Go back to the homepage</Link>\n </Layout>\n)\n\nexport default SecondPage\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\n\nimport InternalPageRenderer from \"./page-renderer\"\n\nconst ProdPageRenderer = ({ location, pageResources }) => {\n if (!pageResources) {\n return null\n }\n return React.createElement(InternalPageRenderer, {\n location,\n pageResources,\n ...pageResources.json,\n })\n}\n\nProdPageRenderer.propTypes = {\n location: PropTypes.shape({\n pathname: PropTypes.string.isRequired,\n }).isRequired,\n}\n\nexport default ProdPageRenderer\n"],"sourceRoot":""}