-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomponent---src-templates-blog-tsx-b57d24eb9af86a8d409b.js.map
1 lines (1 loc) · 3.01 KB
/
component---src-templates-blog-tsx-b57d24eb9af86a8d409b.js.map
1
{"version":3,"sources":["webpack:///./src/templates/Blog.tsx"],"names":["props","pageContext","currentPage","totalPages","data","allMarkdownRemark","edges","totalCount","title","config","siteTitle","to","uppercase","map","post","node","frontmatter","date","excerpt","timeToRead","slug","fields","category","key","url","BlogQuery"],"mappings":"2FAAA,0HAee,mBAACA,GAAiB,MACKA,EAAMC,YAAlCC,EADuB,EACvBA,YAAaC,EADU,EACVA,WADU,EAGdH,EAATI,KAC2BC,kBAA3BC,EAJuB,EAIvBA,MAAOC,EAJgB,EAIhBA,WAEf,OACE,kBAAC,IAAD,KACE,kBAAC,IAAD,CAAQC,MAAK,UAAYC,IAAOC,YAChC,kBAAC,IAAD,KACE,kBAAC,OAAD,CAAMC,GAAG,KAAKF,IAAOC,WACrB,kBAAC,IAAD,CAAcE,WAAW,GAAzB,eAA4CL,EAA5C,MAEF,kBAAC,IAAD,KACE,kBAAC,IAAD,KACGD,EAAMO,KAAI,SAACC,GAAD,OACT,kBAAC,IAAD,CACEN,MAAOM,EAAKC,KAAKC,YAAYR,MAC7BS,KAAMH,EAAKC,KAAKC,YAAYC,KAC5BC,QAASJ,EAAKC,KAAKG,QACnBC,WAAYL,EAAKC,KAAKI,WACtBC,KAAMN,EAAKC,KAAKM,OAAOD,KACvBE,SAAUR,EAAKC,KAAKC,YAAYM,SAChCC,IAAKT,EAAKC,KAAKM,OAAOD,UAG1B,kBAAC,IAAD,CAAYlB,YAAaA,EAAaC,WAAYA,EAAYqB,IAAK,aAOtE,IAAMC,EAAY","file":"component---src-templates-blog-tsx-b57d24eb9af86a8d409b.js","sourcesContent":["import React from 'react';\nimport { Link, graphql } from 'gatsby';\nimport { Layout, Article, Wrapper, SectionTitle, Header, Content, Pagination } from '../components';\nimport { Helmet } from 'react-helmet';\nimport config from '../../config/SiteConfig';\nimport Data from '../models/Data';\n\ninterface Props {\n data: Data;\n pageContext: {\n currentPage: number;\n totalPages: number;\n };\n}\n\nexport default (props: Props) => {\n const { currentPage, totalPages } = props.pageContext;\n\n const { data } = props;\n const { edges, totalCount } = data.allMarkdownRemark;\n\n return (\n <Layout>\n <Helmet title={`Blog | ${config.siteTitle}`} />\n <Header>\n <Link to=\"/\">{config.siteTitle}</Link>\n <SectionTitle uppercase={true}>Blog posts ({totalCount})</SectionTitle>\n </Header>\n <Wrapper>\n <Content>\n {edges.map((post) => (\n <Article\n title={post.node.frontmatter.title}\n date={post.node.frontmatter.date}\n excerpt={post.node.excerpt}\n timeToRead={post.node.timeToRead}\n slug={post.node.fields.slug}\n category={post.node.frontmatter.category}\n key={post.node.fields.slug}\n />\n ))}\n <Pagination currentPage={currentPage} totalPages={totalPages} url={'blog'} />\n </Content>\n </Wrapper>\n </Layout>\n );\n};\n\nexport const BlogQuery = graphql`\n query($skip: Int!, $limit: Int!) {\n allMarkdownRemark(\n sort: { fields: [frontmatter___date], order: DESC }\n limit: $limit\n skip: $skip\n ) {\n totalCount\n edges {\n node {\n fields {\n slug\n }\n frontmatter {\n title\n date(formatString: \"YYYY-MM-DD\")\n category\n }\n excerpt(pruneLength: 200)\n timeToRead\n }\n }\n }\n }\n`;\n"],"sourceRoot":""}