-
Notifications
You must be signed in to change notification settings - Fork 0
/
32-65b778c8e3c6eba21382.js.map
1 lines (1 loc) · 3.02 KB
/
32-65b778c8e3c6eba21382.js.map
1
{"version":3,"sources":["webpack:///./src/components/molecules/dashboard/ImportantInformation.js"],"names":["ImportantInformationContainer","styled","BasicCard","props","theme","palette","primary","main","data","useTranslation","i18n","t","paragraphArray","allImportantInformation","edges","filter","e","node","type","map","withLanguage","listItemArray","dangerouslySetInnerHTML","__html","p","i","key","li"],"mappings":"mnCAOMA,EAAgCC,YAAOC,KAAV,sGAAGD,CAAH,gIAItB,SAAAE,GAAK,OAAIA,EAAMC,MAAMC,QAAQC,QAAQC,QAYnC,mBAAAJ,GACb,IAAMK,EAAI,OADY,EAiBFC,cAAZC,EAjBc,EAiBdA,KAAMC,EAjBQ,EAiBRA,EAERC,EAAiBJ,EAAKK,wBAAwBC,MACjDC,QAAO,SAAAC,GAAC,MAAoB,cAAhBA,EAAEC,KAAKC,QACnBC,KAAI,SAAAH,GAAC,OAAII,YAAaV,EAAMM,EAAEC,KAAM,WAEjCI,EAAgBb,EAAKK,wBAAwBC,MAChDC,QAAO,SAAAC,GAAC,MAAoB,SAAhBA,EAAEC,KAAKC,QACnBC,KAAI,SAAAH,GAAC,OAAII,YAAaV,EAAMM,EAAEC,KAAM,WAEvC,OACE,kBAACjB,EAAD,KACE,uBACEsB,wBAAyB,CACvBC,OAAQZ,EAAE,uCAGd,uBACEW,wBAAyB,CACvBC,OAAQZ,EAAE,uCAGbC,EAAeO,KAAI,SAACK,EAAGC,GAAJ,OAClB,uBAAGC,IAAKD,EAAGH,wBAAyB,CAAEC,OAAQC,QAEhD,wBAAIN,KAAK,KACNG,EAAcF,KAAI,SAACQ,EAAIF,GAAL,OACjB,wBAAIC,IAAKD,EAAGH,wBAAyB,CAAEC,OAAQI","file":"32-65b778c8e3c6eba21382.js","sourcesContent":["import React from \"react\"\nimport { useTranslation } from \"react-i18next\"\nimport styled from \"styled-components\"\nimport { useStaticQuery, graphql } from \"gatsby\"\nimport { BasicCard } from \"@components/atoms/Card\"\nimport { withLanguage } from \"@/utils/i18n\"\n\nconst ImportantInformationContainer = styled(BasicCard)`\n font-size: 16px;\n\n a {\n color: ${props => props.theme.palette.primary.main};\n }\n p {\n margin-bottom: 8px;\n }\n\n ol {\n margin-right: 16px;\n list-style-type: decimal;\n list-style-position: inside;\n }\n`\nexport default props => {\n const data = useStaticQuery(\n graphql`\n query {\n allImportantInformation(filter: { enabled: { eq: \"Y\" } }) {\n edges {\n node {\n order\n type\n text_zh\n text_en\n }\n }\n }\n }\n `\n )\n const { i18n, t } = useTranslation()\n\n const paragraphArray = data.allImportantInformation.edges\n .filter(e => e.node.type === \"paragraph\")\n .map(e => withLanguage(i18n, e.node, \"text\"))\n\n const listItemArray = data.allImportantInformation.edges\n .filter(e => e.node.type === \"item\")\n .map(e => withLanguage(i18n, e.node, \"text\"))\n\n return (\n <ImportantInformationContainer>\n <p\n dangerouslySetInnerHTML={{\n __html: t(\"importantInformation.chp_hotline\"),\n }}\n />\n <p\n dangerouslySetInnerHTML={{\n __html: t(\"importantInformation.had_hotline\"),\n }}\n />\n {paragraphArray.map((p, i) => (\n <p key={i} dangerouslySetInnerHTML={{ __html: p }} />\n ))}\n <ol type=\"i\">\n {listItemArray.map((li, i) => (\n <li key={i} dangerouslySetInnerHTML={{ __html: li }} />\n ))}\n </ol>\n </ImportantInformationContainer>\n )\n}\n"],"sourceRoot":""}