{"version":3,"sources":["webpack:///./src/components/PostLink.js","webpack:///./src/pages/blog.js"],"names":["PostLink","post","useTranslation","t","i18n","date","Date","frontmatter","className","title","author","toLocaleString","languages","config","dateFormat","excerpt","to","slug","pageQuery","PostPage","data","window","filteredPosts","allMarkdownRemark","edges","filter","edge","node","language","Layout","SEO","description","map","key","id","length"],"mappings":"0OAyCeA,EAlCE,SAAC,GAAc,IAAZC,EAAW,EAAXA,KAAW,EACTC,cAAZC,EADqB,EACrBA,EAAGC,EADkB,EAClBA,KACLC,EAAO,IAAIC,KAAKL,EAAKM,YAAYF,MAEvC,OACE,mBAAKG,UAAU,QACb,sBACGP,EAAKM,YAAYE,OAEpB,iBAAGD,UAAU,iCACVL,EACC,SACA,CACEO,OAAQT,EAAKM,YAAYG,OACzBL,KAAMA,EAAKM,eAAeP,EAAKQ,UAAU,GAAIC,IAAOC,eAI1D,iBAAGN,UAAU,QACVP,EAAKc,SAER,mBAAKP,UAAU,cACb,YAAC,OAAD,CAAMQ,GAAIf,EAAKM,YAAYU,MACxBd,EAAE,uB,YCiCAe,EAAS,aAuBPC,UA7EE,SAAC,GAEX,IADLC,EACI,EADJA,KAEA,GAAsB,oBAAXC,OACT,OAAO,KAFL,MAKgBnB,cAAZC,EALJ,EAKIA,EAAGC,EALP,EAKOA,KAILkB,EAHwBF,EAAtBG,kBACAC,MAIHC,QAAO,SAACC,GAAD,QAAYA,EAAKC,KAAKpB,YAAYF,QACzCoB,QAAO,SAACC,GAAD,OAAUA,EAAKC,KAAKpB,YAAYqB,WAAaxB,EAAKQ,UAAU,MAGxE,OACE,YAACiB,EAAA,EAAD,KACE,YAACC,EAAA,EAAD,CACErB,MAAON,EAAE,QACT4B,YAAa5B,EAAE,iBAEjB,uBAASK,UAAU,gCACjB,8BACE,sBACGL,EAAE,SAEL,iBAAGK,UAAU,2BACVL,EAAE,iBAGNmB,EAAcU,KAAI,SAACN,GAAD,OACjB,YAAC,EAAD,CAAUO,IAAKP,EAAKC,KAAKO,GAAIjC,KAAMyB,EAAKC,UAEzCL,EAAca,QAAU,GACvB,mBAAK3B,UAAU,SACb,kBAAIA,UAAU,6BACXL,EAAE,YAEL,iBAAGK,UAAU,qDACVL,EAAE","file":"component---src-pages-blog-js-a7bda6b2c70ff08493d8.js","sourcesContent":["import { Link } from 'gatsby';\nimport { useTranslation } from 'react-i18next';\nimport PropTypes from 'prop-types';\nimport React from 'react';\n\nimport config from '../../site-config';\n\nconst PostLink = ({ post }) => {\n const { t, i18n } = useTranslation();\n const date = new Date(post.frontmatter.date);\n\n return (\n
\n

\n {post.frontmatter.title}\n

\n

\n {t(\n 'author',\n {\n author: post.frontmatter.author,\n date: date.toLocaleString(i18n.languages[0], config.dateFormat),\n }\n )}\n

\n

\n {post.excerpt}\n

\n
\n \n {t('continueReading')}\n \n
\n
\n );\n};\n\nPostLink.propTypes = {\n post: PropTypes.object.isRequired,\n};\n\nexport default PostLink;\n","import { graphql } from 'gatsby';\nimport { useTranslation } from 'react-i18next';\nimport PropTypes from 'prop-types';\nimport React from 'react';\n\nimport Layout from '../components/Layout';\nimport PostLink from '../components/PostLink';\nimport SEO from '../components/SEO';\n\nconst PostPage = ({\n data,\n}) => {\n if (typeof window === 'undefined') {\n return null;\n }\n\n const { t, i18n } = useTranslation();\n const { allMarkdownRemark } = data;\n const { edges: posts } = allMarkdownRemark;\n\n const filteredPosts = (\n posts\n .filter((edge) => !!edge.node.frontmatter.date)\n .filter((edge) => edge.node.frontmatter.language === i18n.languages[0])\n );\n\n return (\n \n \n
\n <>\n

\n {t('blog')}\n

\n

\n {t('blogExplain')}\n

\n \n {filteredPosts.map((edge) => (\n \n ))}\n {filteredPosts.length <= 0 && (\n
\n

\n {t('noPosts')}\n

\n

\n {t('noPostsChangeLanguage')}\n

\n
\n )}\n
\n
\n );\n};\n\nPostPage.propTypes = {\n data: PropTypes.object.isRequired,\n};\n\nexport const pageQuery = graphql`\n query {\n allMarkdownRemark(\n filter: { frontmatter: { visible: { eq: true } } }\n sort: { order: DESC, fields: [frontmatter___date] }\n ) {\n edges {\n node {\n id\n excerpt(pruneLength: 250)\n frontmatter {\n author\n date\n language\n slug\n title\n }\n }\n }\n }\n }\n`;\n\nexport default PostPage;\n"],"sourceRoot":""}