-
Notifications
You must be signed in to change notification settings - Fork 1
/
component---src-templates-tag-js-5ca10505b4a71b5857dc.js.map
1 lines (1 loc) · 3.27 KB
/
component---src-templates-tag-js-5ca10505b4a71b5857dc.js.map
1
{"version":3,"file":"component---src-templates-tag-js-5ca10505b4a71b5857dc.js","mappings":"4KAsDA,UAxCY,SAAHA,GAAyC,IAAnCC,EAAID,EAAJC,KAAMC,EAAQF,EAARE,SAAUC,EAAWH,EAAXG,YACrBC,EAAMH,EAAKI,SACXC,EAAQL,EAAKM,aAAaC,MAEhC,OACIC,EAAAA,cAAAA,EAAAA,SAAA,KACIA,EAAAA,cAACC,EAAAA,EAAQ,CAACT,KAAMA,EAAMC,SAAUA,EAAUS,KAAK,WAC/CF,EAAAA,cAACG,EAAAA,GAAM,KACHH,EAAAA,cAAA,OAAKI,UAAU,aACXJ,EAAAA,cAAA,UAAQI,UAAU,cACdJ,EAAAA,cAAA,UAAKL,EAAIU,MACRV,EAAIW,YAAcN,EAAAA,cAAA,SAAIL,EAAIW,aAAmB,MAElDN,EAAAA,cAAA,WAASI,UAAU,aACdP,EAAMU,KAAI,SAAAC,GAAA,IAAGC,EAAID,EAAJC,KAAI,OAEdT,EAAAA,cAACU,EAAAA,GAAQ,CAACC,IAAKF,EAAKG,GAAIC,KAAMJ,GAAQ,KAG9CT,EAAAA,cAACc,EAAAA,GAAU,CAACpB,YAAaA,MAK7C,C","sources":["webpack://gatsby-portfolio/./src/templates/tag.js"],"sourcesContent":["import * as React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { graphql } from \"gatsby\";\n\nimport { Layout } from \"@components/layouts\";\nimport { PostCard, Pagination } from \"@components/common\";\nimport { MetaData } from \"@components/common/meta\";\n\n/**\n * Tag page (/tag/:slug)\n *\n * Loads all posts for the requested tag incl. pagination.\n *\n */\nconst Tag = ({ data, location, pageContext }) => {\n const tag = data.ghostTag;\n const posts = data.allGhostPost.edges;\n\n return (\n <>\n <MetaData data={data} location={location} type=\"series\" />\n <Layout>\n <div className=\"container\">\n <header className=\"tag-header\">\n <h1>{tag.name}</h1>\n {tag.description ? <p>{tag.description}</p> : null}\n </header>\n <section className=\"post-feed\">\n {posts.map(({ node }) => (\n // The tag below includes the markup for each post - components/common/PostCard.js\n <PostCard key={node.id} post={node} />\n ))}\n </section>\n <Pagination pageContext={pageContext} />\n </div>\n </Layout>\n </>\n );\n};\n\nTag.propTypes = {\n data: PropTypes.shape({\n ghostTag: PropTypes.shape({\n name: PropTypes.string.isRequired,\n description: PropTypes.string,\n }),\n allGhostPost: PropTypes.object.isRequired,\n }).isRequired,\n location: PropTypes.shape({\n pathname: PropTypes.string.isRequired,\n }).isRequired,\n pageContext: PropTypes.object,\n};\n\nexport default Tag;\n\nexport const pageQuery = graphql`\n query GhostTagQuery($slug: String!, $limit: Int!, $skip: Int!) {\n ghostTag(slug: { eq: $slug }) {\n ...GhostTagFields\n }\n allGhostPost(\n sort: { order: DESC, fields: [published_at] }\n filter: { tags: { elemMatch: { slug: { eq: $slug } } } }\n limit: $limit\n skip: $skip\n ) {\n edges {\n node {\n ...GhostPostFields\n }\n }\n }\n }\n`;\n"],"names":["_ref","data","location","pageContext","tag","ghostTag","posts","allGhostPost","edges","React","MetaData","type","Layout","className","name","description","map","_ref2","node","PostCard","key","id","post","Pagination"],"sourceRoot":""}