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,MAAOpB,EAAQqB,SAASC,MAAMC,gBAC9BC,IAAI,GACJC,UAAU,UACVC,YAAY,cAKlB,gBAAC,UAAD,CACEnC,YAAa,CACXO,KAAAA,EACAgB,OAAQjB,EAAgBI,GACxBc,MAAOlB,EAAgBI,IAEzBT,SAAUA","sources":["webpack://gatsby-starter-default/./src/components/button.js","webpack://gatsby-starter-default/./src/components/weeklyTemplate.js"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport TransitionLink from 'gatsby-plugin-transition-link';\n\nconst Button = ({ children, to, gatsbyLink }) =>\n gatsbyLink ? (\n \n {children}\n \n ) : (\n \n {children}\n \n );\n\nconst ButtonLink = styled(TransitionLink)`\n background-color: #b82c97;\n color: #ffffff;\n padding: 16px 24px;\n text-decoration: none;\n border-radius: 5px;\n font-weight: 500;\n margin-bottom: 1rem;\n display: inline-block;\n transition: background-color 0.2s;\n text-align: center;\n\n :hover,\n :focus {\n background-color: #9e2682;\n color: #ffffff;\n }\n`;\nconst ButtonA = styled.a`\n background-color: #b82c97;\n color: #ffffff;\n padding: 12px 25px;\n text-decoration: none;\n border-radius: 5px;\n font-weight: 500;\n margin-bottom: 1rem;\n display: inline-block;\n transition: all 0.2s;\n @media (max-width: 900px) {\n text-align: center;\n }\n :hover,\n :focus {\n background-color: #9e2682;\n color: #ffffff;\n text-decoration: none;\n }\n`;\n\nexport default Button;\n","import React, { useContext, useEffect } from 'react';\n\nimport Seo from '../components/Seo';\nimport FadeTransition from './../components/fadeTransition';\nimport { GatsbyImage } from 'gatsby-plugin-image';\n\nimport { context } from './../components/context';\nimport WeekNav from './weekNav';\nimport Button from './button';\nimport ChallengeTemplate from './challengeTemplate';\nimport { Wrapper, ContentWrapper, SidebarWrapper } from './Layout';\nimport ClientOnly from './ClientOnly';\n\nconst WeeklyTemplate = ({ pageContext, location }) => {\n const appContext = useContext(context);\n const { setDisplayWeek, savedChallenges } = appContext;\n const week = pageContext ? pageContext.week : appContext.displayWeek;\n const content = appContext.content[week];\n const weekString = `week${week}`;\n\n useEffect(() => {\n setDisplayWeek(week);\n }, [week, setDisplayWeek]);\n\n return (\n <>\n \n\n \n \n {savedChallenges?.[weekString] === undefined ? (\n \n \n \n {content.choices.map((choice, index) => (\n \n ))}\n \n \n \n \n \n ) : (\n \n )}\n \n \n >\n );\n};\n\nexport default WeeklyTemplate;\n"],"names":["ButtonLink","styled","TransitionLink","ButtonA","children","to","gatsbyLink","exit","length","entry","href","target","rel","pageContext","location","appContext","useContext","context","setDisplayWeek","savedChallenges","week","displayWeek","content","weekString","useEffect","Seo","title","ClientOnly","undefined","Wrapper","ContentWrapper","week_number","currentWeek","weekTitle","choices","map","choice","index","key","id","SidebarWrapper","G","image","topImage","asset","gatsbyImageData","alt","objectFit","placeholder"],"sourceRoot":""}