-
Notifications
You must be signed in to change notification settings - Fork 0
/
component---src-templates-category-tsx-a65cb24d1ca8436bca89.js.map
1 lines (1 loc) · 2.54 KB
/
component---src-templates-category-tsx-a65cb24d1ca8436bca89.js.map
1
{"version":3,"sources":["webpack:///./src/templates/Category.tsx"],"names":["props","pathContext","posts","categoryName","totalCount","length","subline","title","config","siteTitle","to","sectionTitle","map","post","index","frontmatter","date","excerpt","slug","timeToRead","category","key"],"mappings":"iMAQe,mBAACA,GAAqB,MACHA,EAAMC,YAA9BC,EAD2B,EAC3BA,MAAOC,EADoB,EACpBA,aACTC,EAAaF,EAAQA,EAAMG,OAAS,EACpCC,EAAaF,EAAN,SAAuC,IAAfA,EAAmB,GAAK,KAAhD,iBAAoED,EAApE,IAEb,OACE,kBAAC,IAAD,KACE,kBAAC,IAAD,CAAQI,MAAUJ,EAAL,MAAuBK,IAAOC,YAC3C,kBAAC,IAAD,KACE,kBAAC,OAAD,CAAMC,GAAG,KAAKF,IAAOC,WACrB,kBAAC,IAAD,mBAAgCN,GAChC,kBAAC,IAAD,CAASQ,cAAc,GACpBL,EADH,SACiB,kBAAC,OAAD,CAAMI,GAAG,eAAT,kBADjB,MAIF,kBAAC,IAAD,KACE,kBAAC,IAAD,KACGR,EACGA,EAAMU,KAAI,SAACC,EAAWC,GAAZ,OACR,kBAAC,IAAD,CACEP,MAAOM,EAAKE,YAAYR,MACxBS,KAAMH,EAAKE,YAAYC,KACvBC,QAASJ,EAAKI,QACdC,KAAM,IAAUL,EAAKE,YAAYR,OACjCY,WAAYN,EAAKM,WACjBC,SAAUP,EAAKE,YAAYK,SAC3BC,IAAKP,OAGT","file":"component---src-templates-category-tsx-a65cb24d1ca8436bca89.js","sourcesContent":["import React from 'react';\nimport { Helmet } from 'react-helmet';\nimport { Link } from 'gatsby';\nimport { Layout, Wrapper, Header, Subline, Article, SectionTitle, Content } from '../components';\nimport config from '../../config/SiteConfig';\nimport { kebabCase } from 'lodash';\nimport PageProps from '../models/PageProps';\n\nexport default (props: PageProps) => {\n const { posts, categoryName } = props.pathContext;\n const totalCount = posts ? posts.length : 0;\n const subline = `${totalCount} post${totalCount === 1 ? '' : 's'} tagged with \"${categoryName}\"`;\n\n return (\n <Layout>\n <Helmet title={`${categoryName} | ${config.siteTitle}`} />\n <Header>\n <Link to=\"/\">{config.siteTitle}</Link>\n <SectionTitle>Category – {categoryName}</SectionTitle>\n <Subline sectionTitle={true}>\n {subline} (See <Link to=\"/categories\">all categories</Link>)\n </Subline>\n </Header>\n <Wrapper>\n <Content>\n {posts\n ? posts.map((post: any, index: number) => (\n <Article\n title={post.frontmatter.title}\n date={post.frontmatter.date}\n excerpt={post.excerpt}\n slug={kebabCase(post.frontmatter.title)}\n timeToRead={post.timeToRead}\n category={post.frontmatter.category}\n key={index}\n />\n ))\n : null}\n </Content>\n </Wrapper>\n </Layout>\n );\n};\n"],"sourceRoot":""}