-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomponent---src-pages-index-js-3c15b45f40929efdeb42.js.map
1 lines (1 loc) · 6.12 KB
/
component---src-pages-index-js-3c15b45f40929efdeb42.js.map
1
{"version":3,"sources":["webpack:///./.cache/gatsby-browser-entry.js","webpack:///./src/pages/index.js","webpack:///./.cache/public-page-renderer.js","webpack:///./.cache/public-page-renderer-prod.js"],"names":["loader","enqueue","React","createContext","allMarkdownRemark","data","className","edges","map","node","key","id","to","fields","slug","frontmatter","title","date","excerpt","Date","getFullYear","query","m","module","exports","require","default","ProdPageRenderer","location","pageResources","createElement","InternalPageRenderer","json"],"mappings":"oKAcyBA,QAAOC,QAELC,IAAMC,cAAc,IChB/C,sCAGe,sBAAe,IAClBC,EADiB,EAAXC,KACND,kBACR,OACI,yBAAKE,UAAU,aACX,wBAAIA,UAAU,iBAAd,mBACA,wGACI,6BADJ,oCAECF,EAAkBG,MAAMC,KAAI,gBAAGC,EAAH,EAAGA,KAAH,OAAc,6BAASC,IAAKD,EAAKE,IAC1D,kBAAC,IAAD,CAAMC,GAAIH,EAAKI,OAAOC,MAAO,4BAAKL,EAAKM,YAAYC,QACnD,2BAAIP,EAAKM,YAAYE,MACrB,2BAAIR,EAAKS,aAGb,wEAAyD,IAAIC,MAAOC,iBAbjE,IAkBFC,EAAK,c,qBCrBlB,IAAsBC,EAKpBC,EAAOC,SALaF,EAKWG,EAAQ,UALRH,EAAEI,SAAYJ,G,wFCsBhCK,UAjBU,SAAC,GAAiC,IAA/BC,EAA8B,EAA9BA,SAAUC,EAAoB,EAApBA,cACpC,OAAKA,EAGE3B,IAAM4B,cAAcC,IAApB,eACLH,WACAC,iBACGA,EAAcG,OALV","file":"component---src-pages-index-js-3c15b45f40929efdeb42.js","sourcesContent":["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 { graphql, Link } from \"gatsby\";\n\nexport default ({ data }) => {\n const { allMarkdownRemark } = data;\n return (\n <div className=\"container\">\n <h1 className=\"the-big-title\">Trung Do's Blog</h1>\n <p>I'm a curious person who loves [web] engineering and building cool stuffs.\n <br /> A bit more details about myself</p>\n {allMarkdownRemark.edges.map(({ node }) => <article key={node.id}>\n <Link to={node.fields.slug} ><h2>{node.frontmatter.title}</h2></Link>\n <i>{node.frontmatter.date}</i>\n <p>{node.excerpt}</p>\n </article>)}\n\n <footer>Crafted with ♥ and powered Gatsby © {new Date().getFullYear()}</footer>\n </div>\n )\n}\n\nexport const query = graphql`\n query {\n allMarkdownRemark(sort: { fields: [frontmatter___date], order: DESC }) {\n edges {\n node {\n id\n frontmatter {\n title\n date(formatString: \"DD MMMM, YYYY\")\n }\n fields {\n slug\n }\n excerpt\n }\n }\n }\n }\n`","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\"\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":""}