{"version":3,"sources":["webpack:///./src/components/pageContent.js","webpack:///./src/components/furtherpages.js","webpack:///./src/components/Modal.js","webpack:///./src/components/relatedLinks.js","webpack:///./src/templates/coastguard-content-page.js","webpack:///./src/components/sideBar.js"],"names":["PageContent","props","content","indexOf","replace","___EmotionJSX","dangerouslySetInnerHTML","__html","Furtherpage","path","data","useStaticQuery","window","lastIndex","location","pathname","lastIndexOf","length","substring","ports","harbours","marinas","coastguard","airport","mainMenu","futherpages","wpgraphql","menus","nodes","forEach","node","name","menuItems","url","toLowerCase","childItems","childnode","push","id","label","className","map","key","Links","to","getModalStyle","top","left","transform","useStyles","makeStyles","theme","modal","display","alignItems","justifyContent","paper","position","width","backgroundColor","palette","background","boxShadow","shadows","padding","spacing","ModalImages","classes","modalStyle","React","useState","open","setOpen","handleClose","Button","onClick","handleOpen","src","encodeURI","alt","title","Modal","onClose","style","RelatedLinks","css","relatedLinkStyle","Template","Fragment","RelatedPages","link","index","RelatedDocuments","RelatedImages","_ref","post","relatedLinks","relatedPages","relatedDocuments","relatedImages","keywords","AllPostTypeFields","relatedDocument1","relatedDocumentTitle1","mediaItemUrl","relatedDocument2","relatedDocumentTitle2","relatedDocument3","relatedDocumentTitle3","relatedDocument4","relatedDocumentTitle4","relatedDocument5","relatedDocumentTitle5","relatedDocument6","relatedDocumentTitle6","relatedDocument7","relatedDocumentTitle7","relatedDocument8","relatedDocumentTitle8","relatedDocument9","relatedDocumentTitle9","relatedDocument10","relatedDocumentTitle10","relatedLink1","target","relatedLink2","relatedLink3","relatedLink4","relatedLink5","relatedLink6","relatedLink7","relatedLink8","relatedLink9","relatedLink10","relatedSectionPages","relatedPage1","relatedPage2","relatedPage3","relatedPage4","relatedPage5","relatedPage6","relatedPage7","relatedPage8","relatedPage9","relatedPage10","contentImage","contentImage1","height","contentImage2","contentImage3","contentImage4","contentImage5","contentImage6","contentImage7","contentImage8","contentImage9","contentImage10","Layout","SEO","layoutStyles","SideBar","images","require","fetchUrl","setFetchUrl","urlString","hideOnMobile","useMediaQuery","setData","isError","setIsError","weatherIcon","setWeatherIcon","Class","FullWidth","useEffect","async","result","axios","process","error","console","log","fetchData","sidebarStyle","onSubmit","event","preventDefault","href","htmlFor","type","marginRight","onChange","value","Link","Arrived","Departed","nextTide","futureTide","weatherDate","weatherMaxTemp","Mail2U"],"mappings":"4FAAA,0BAYeA,IAVMC,IACjB,IAAIC,EAAU,GAOd,OALID,EAAMC,UACRA,EAAUD,EAAMC,SACbD,EAAMC,QAAQC,QAAQ,gCAAkC,GAAKF,EAAMC,QAAQC,QAAQ,iCAAmC,GAAKF,EAAMC,QAAQC,QAAQ,sCAAwC,KAC1LD,EAAUD,EAAMC,QAAQE,QAAQ,2CAA+C,IAAIA,QAAQ,4CAAgD,IAAIA,QAAQ,SAAS,IAAIA,QAAQ,iBAAiB,IAAIA,QAAQ,WAAW,MAEjNC,YAAA,OAAKC,wBAAyB,CAAEC,OAAQL,O,+FC8GpCM,MApHKA,KAChB,IAAIC,EAAM,GACV,MAAMC,EAAOC,yBAAe,cA2B5B,GAAsB,oBAAXC,OAAwB,CAE/B,IAAIC,GADJJ,EAAKG,OAAOE,SAASC,UACAC,YAAY,KAC9BH,IAAaJ,EAAKQ,OAAO,IAGxBJ,GADAJ,EAAOA,EAAKS,UAAU,EAAEL,EAAU,IACjBG,YAAY,MAEjCP,EAAOA,EAAKS,UAAU,EAAEL,GAG5B,GAAU,sBAAPJ,GAAmC,mBAAPA,GAAgC,mBAAPA,GAAgC,MAAPA,GAAmB,oBAAPA,GAAiC,KAAPA,EAEnH,MAAO,GAEP,CACJ,IAAIU,GAAQ,EACRC,GAAW,EACXC,GAAU,EACVC,GAAa,EACbC,GAAU,EAEQ,oBAAXX,UACiC,IAAtCH,EAAKN,QAAQ,oBACfmB,GAAW,GAC+B,IAAnCb,EAAKN,QAAQ,iBACpBkB,GAAQ,GACmC,IAApCZ,EAAKN,QAAQ,kBACpBiB,GAAS,GACiC,IAAnCX,EAAKN,QAAQ,iBACpBoB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AQ,OAAQ4C,YAAY,OACrCC,SAAWN,GAAUtB,EAAYsB,EAAM9D,OAAOqE,SAEhD5L,YAAA,SACEyL,KAAK,SACLtJ,UAAU,eACVyJ,MAAM,GACNlH,IAAI,aAKR1E,YAAA,OAAKiC,GAAG,YACNjC,YAAA,UACEA,YAAC6L,OAAI,CACHtJ,GAAG,uCACJ,0BAIHvC,YAAA,UACEA,YAAA,MAAImC,UAAU,UACZnC,YAAA,cAAQ,WACRA,YAAA,WACCK,EAAKyL,SAER9L,YAAA,MAAImC,UAAU,UACZnC,YAAA,cAAQ,YACRA,YAAA,WACCK,EAAK0L,YAKZ/L,YAAA,OAAKiC,GAAG,SACNjC,YAAA,UACEA,YAAA,KAAGuL,KAAK,SAAS5G,MAAM,sBAAqB,uBAI9C3E,YAAA,UACEA,YAAA,MAAIC,wBAAyB,CAAEC,OAAOG,EAAK2L,YAC3ChM,YAAA,MAAIC,wBAAyB,CAAEC,OAAOG,EAAK4L,gBAW/CjM,YAAA,OAAKiC,GAAG,WACNjC,YAAA,UACEA,YAAC6L,OAAI,CACHtJ,GAAG,WACHoC,MAAM,uCACP,eACa3E,YAAA,YAAM,eAGtBA,YAAA,SACEA,YAAA,cAASK,EAAK6L,cAGhBlM,YAAA,OAAKmC,UAAU,SACbnC,YAAC6L,OAAI,CACHtJ,GAAG,WACHoC,MAAM,uCAEN3E,YAAA,OAAKwE,IAAK8F,EAAa5F,IAAI,MAE7B1E,YAAA,SAAG,MAEDA,YAAA,WACAA,YAAA,QAAMmC,UAAU,eAAe9B,EAAK8L,eAAe,SAKxDlC,GAAgBjK,YAACoM,IAAM","file":"component---src-templates-coastguard-content-page-js-f45ffb0bffd4625221f6.js","sourcesContent":["import React from \"react\"\n\nconst PageContent = (props) => {\n var content = \"\";\n\n if (props.content) {\n content = props.content\n if(props.content.indexOf('portstest.azurewebsites.net') > -1 || props.content.indexOf('pojcontent.azurewebsites.net') > -1 || props.content.indexOf('pojcontentlinux.azurewebsites.net') > -1)\n content = props.content.replace(\"http://\"+process.env.GATSBY_WORDPRESS_PREVIEW,\"\").replace(\"https://\"+process.env.GATSBY_WORDPRESS_PREVIEW,\"\").replace(\"/ports\",\"\").replace(\"/jerseyairport\",\"\").replace(\"/default\",\"\");\n }\n return
;\n}\nexport default PageContent","\nimport React from \"react\"\nimport { useStaticQuery, graphql } from \"gatsby\"\nimport Links from '../components/Links'\nconst Furtherpage = () => {\n var path= \"\";\n const data = useStaticQuery(graphql`\n query SitePagesQuery {\n wpgraphql {\n menus{\n nodes {\n id\n name\n menuItems {\n \n nodes {\n id\n url\n label\n childItems {\n nodes {\n id\n url\n label\n }\n }\n }\n }\n }\n }\n }\n }\n `);\n if (typeof window !== 'undefined') {\n path=window.location.pathname;\n var lastIndex = path.lastIndexOf('/');\n if(lastIndex ===path.length-1)\n {\n path = path.substring(0,lastIndex-1)\n lastIndex = path.lastIndexOf('/');\n }\n path = path.substring(0,lastIndex)\n }\n\n if(path===\"/jerseycoastguard\"||path===\"/jerseymarinas\"||path===\"/jerseyairport\"||path===\"/\"||path===\"/jerseyharbours\"||path===\"\")\n {\n return \"\";\n }\n else{\n let ports = false;\n let harbours = false;\n let marinas = false;\n let coastguard = false;\n let airport = false;\n \n if (typeof window !== 'undefined') {\n if (path.indexOf(\"jerseycoastguard\") !== -1)\n coastguard=true;\n else if (path.indexOf(\"jerseymarinas\") !== -1)\n marinas=true;\n else if (path.indexOf(\"jerseyharbours\") !== -1)\n harbours=true;\n else if (path.indexOf(\"jerseyairport\") !== -1)\n airport=true;\n else\n ports=true;\n }\n \n if(process.env.GATSBY_SITE_MODE===\"AIRPORT\"){\n airport=true;\n ports=false;\n }\n \n \n var mainMenu=[];\n //var pagename=\"\"\n var futherpages=[];\n\n\n data.wpgraphql.menus.nodes.forEach(node => {\n if (node.name===\"Ports Main Menu\" && ports===true)\n mainMenu = node.menuItems.nodes;\n if (node.name===\"Harbours Main Menu\" && harbours===true)\n mainMenu = node.menuItems.nodes;\n if (node.name===\"Marinas Main Menu\" && marinas===true)\n mainMenu = node.menuItems.nodes;\n if (node.name===\"Coastguard Main Menu\" && coastguard===true)\n mainMenu = node.menuItems.nodes;\n if (node.name===\"Airport Main Menu\" && airport===true)\n mainMenu = node.menuItems.nodes;\n })\n mainMenu.forEach(node => {\n if(node.url.indexOf(path.toLowerCase()+\"/\") > -1)\n {\n //pagename=node.label.replace(\"&\",\"&\").replace(\"’\",\"'\"); \n node.childItems.nodes.forEach(childnode=>{\n if (typeof window !== 'undefined') {\n if(childnode.url.indexOf(window.location.pathname.toLowerCase()) < 0)\n futherpages.push({\"id\":childnode.id,\"name\":childnode.label,\"url\":childnode.url}) \n } \n }\n )\n }\n })\n \n\n if(futherpages.length!==0)\n { \n return (\n
\n

In this section

\n \n
\n )\n } \n else return \"\";\n }\n}\nexport default Furtherpage","import Modal from \"@material-ui/core/Modal\"\nimport React from \"react\"\nimport Button from \"@material-ui/core/Button\"\nimport { makeStyles } from '@material-ui/core/styles';\n\n\nfunction getModalStyle() {\n const top = 50;\n const left = 50;\n return {\n top: `${top}%`,\n left: `${left}%`,\n transform: `translate(-${top}%, -${left}%)`,\n };\n}\n\nconst useStyles = makeStyles(theme => ({\n modal: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n paper: {\n position: 'absolute',\n width: 450,\n backgroundColor: theme.palette.background.paper,\n boxShadow: theme.shadows[5],\n padding: theme.spacing(2, 4, 3),\n },\n}));\n\nconst ModalImages = (props) => {\n const classes = useStyles();\n const [modalStyle] = React.useState(getModalStyle);\n const [open, setOpen] = React.useState(false);\n const handleOpen = () => {\n setOpen(true);\n };\n\n const handleClose = () => {\n setOpen(false);\n };\n return (\n
\n \n\n \n
\n \"\"\n \n
\n \n
)\n}\nexport default ModalImages","import React from \"react\"\nimport Furtherpage from '../components/furtherpages';\nimport { relatedLinkStyle } from '../style/relatedLinksStyle';\nimport Links from '../components/Links';\nimport Modal from '../components/Modal';\nconst RelatedLinks = (props) => {\n return (\n
\n \n {(props.Template!==\"Landing\")&& \n \n \n \n \n {props.RelatedPages.length > 0 && \n \n

Related Pages

\n
    \n {props.RelatedPages.map((link,index) =>
  • )}\n
\n
\n }\n
\n }\n {props.RelatedLinks.length > 0 && \n \n

Related Links

\n
    \n {props.RelatedLinks.map((link, index) =>
  • )}\n
\n
\n }\n {props.RelatedDocuments.length > 0 && \n \n

Related Documents

\n
    \n {props.RelatedDocuments.map((link, index) =>
  • )}\n
\n
\n }\n {(props.Template!==\"Landing\")&& \n \n {props.RelatedImages.length > 0 && \n \n \n
\n\n {props.RelatedImages.map(link => )} \n\n
\n
\n }\n
\n }\n \n
\n \n \n
\n\n )\n}\nexport default RelatedLinks\n\n","import React from \"react\"\nimport { graphql } from \"gatsby\"\nimport Layout from \"../components/layout\"\nimport SEO from \"../components/seo\"\nimport SideBar from \"../components/sideBar\"\nimport RelatedLinks from \"../components/relatedLinks\"\nimport { layoutStyles } from '../style/layoutStyles';\nimport PageContent from '../components/pageContent'\n\nexport default ({ data }) => {\n const post = data.wpgraphql.coastguard\n var relatedLinks = [];\n var relatedPages=[];\n var relatedDocuments=[];\n var relatedImages=[];\n var keywords = [];\n if (post.keywords.nodes != null)\n {\n post.keywords.nodes.forEach(node => { keywords.push(node.name);});\n }\n if (post.AllPostTypeFields.relatedDocuments.relatedDocument1 != null)\n {\n if(post.AllPostTypeFields.relatedDocuments.relatedDocumentTitle1 != null)\n relatedDocuments.push({\"title\": post.AllPostTypeFields.relatedDocuments.relatedDocumentTitle1, \"url\" : post.AllPostTypeFields.relatedDocuments.relatedDocument1.mediaItemUrl})\n else\n relatedDocuments.push({\"title\": post.AllPostTypeFields.relatedDocuments.relatedDocument1.title, \"url\" : post.AllPostTypeFields.relatedDocuments.relatedDocument1.mediaItemUrl})\n }\n if (post.AllPostTypeFields.relatedDocuments.relatedDocument2 != null)\n {\n if(post.AllPostTypeFields.relatedDocuments.relatedDocumentTitle2 != null)\n relatedDocuments.push({\"title\": post.AllPostTypeFields.relatedDocuments.relatedDocumentTitle2, \"url\" : post.AllPostTypeFields.relatedDocuments.relatedDocument2.mediaItemUrl})\n else\n relatedDocuments.push({\"title\": post.AllPostTypeFields.relatedDocuments.relatedDocument2.title, \"url\" : post.AllPostTypeFields.relatedDocuments.relatedDocument2.mediaItemUrl})\n }\n\n if (post.AllPostTypeFields.relatedDocuments.relatedDocument3 != null){\n if(post.AllPostTypeFields.relatedDocuments.relatedDocumentTitle3 != null)\n relatedDocuments.push({\"title\": post.AllPostTypeFields.relatedDocuments.relatedDocumentTitle3, \"url\" : post.AllPostTypeFields.relatedDocuments.relatedDocument3.mediaItemUrl})\n else\n relatedDocuments.push({\"title\": post.AllPostTypeFields.relatedDocuments.relatedDocument3.title, \"url\" : post.AllPostTypeFields.relatedDocuments.relatedDocument3.mediaItemUrl})\n }\n\nif (post.AllPostTypeFields.relatedDocuments.relatedDocument4 != null)\n{\n if(post.AllPostTypeFields.relatedDocuments.relatedDocumentTitle4 != null)\n relatedDocuments.push({\"title\": post.AllPostTypeFields.relatedDocuments.relatedDocumentTitle4, \"url\" : post.AllPostTypeFields.relatedDocuments.relatedDocument4.mediaItemUrl})\n else\n relatedDocuments.push({\"title\": post.AllPostTypeFields.relatedDocuments.relatedDocument4.title, \"url\" : post.AllPostTypeFields.relatedDocuments.relatedDocument4.mediaItemUrl})\n}\n\nif (post.AllPostTypeFields.relatedDocuments.relatedDocument5 != null)\n{\n if(post.AllPostTypeFields.relatedDocuments.relatedDocumentTitle5 != null)\n relatedDocuments.push({\"title\": post.AllPostTypeFields.relatedDocuments.relatedDocumentTitle5, \"url\" : post.AllPostTypeFields.relatedDocuments.relatedDocument5.mediaItemUrl})\n else\n relatedDocuments.push({\"title\": post.AllPostTypeFields.relatedDocuments.relatedDocument5.title, \"url\" : post.AllPostTypeFields.relatedDocuments.relatedDocument5.mediaItemUrl})\n}\n\nif (post.AllPostTypeFields.relatedDocuments.relatedDocument6 != null)\n{\n if(post.AllPostTypeFields.relatedDocuments.relatedDocumentTitle6 != null)\n relatedDocuments.push({\"title\": post.AllPostTypeFields.relatedDocuments.relatedDocumentTitle6, \"url\" : post.AllPostTypeFields.relatedDocuments.relatedDocument6.mediaItemUrl})\n else\n relatedDocuments.push({\"title\": post.AllPostTypeFields.relatedDocuments.relatedDocument6.title, \"url\" : post.AllPostTypeFields.relatedDocuments.relatedDocument6.mediaItemUrl})\n}\n\nif (post.AllPostTypeFields.relatedDocuments.relatedDocument7 != null)\n{\n if(post.AllPostTypeFields.relatedDocuments.relatedDocumentTitle7 != null)\n relatedDocuments.push({\"title\": post.AllPostTypeFields.relatedDocuments.relatedDocumentTitle7, \"url\" : post.AllPostTypeFields.relatedDocuments.relatedDocument7.mediaItemUrl})\n else\n relatedDocuments.push({\"title\": post.AllPostTypeFields.relatedDocuments.relatedDocument7.title, \"url\" : post.AllPostTypeFields.relatedDocuments.relatedDocument7.mediaItemUrl})\n\n}\n\nif (post.AllPostTypeFields.relatedDocuments.relatedDocument8 != null)\n{\n if(post.AllPostTypeFields.relatedDocuments.relatedDocumentTitle8 != null)\n relatedDocuments.push({\"title\": post.AllPostTypeFields.relatedDocuments.relatedDocumentTitle8, \"url\" : post.AllPostTypeFields.relatedDocuments.relatedDocument8.mediaItemUrl})\n else\n relatedDocuments.push({\"title\": post.AllPostTypeFields.relatedDocuments.relatedDocument8.title, \"url\" : post.AllPostTypeFields.relatedDocuments.relatedDocument8.mediaItemUrl})\n\n}\n\nif (post.AllPostTypeFields.relatedDocuments.relatedDocument9 != null)\n{\n if(post.AllPostTypeFields.relatedDocuments.relatedDocumentTitle9 != null)\n relatedDocuments.push({\"title\": post.AllPostTypeFields.relatedDocuments.relatedDocumentTitle9, \"url\" : post.AllPostTypeFields.relatedDocuments.relatedDocument9.mediaItemUrl})\nelse\nrelatedDocuments.push({\"title\": post.AllPostTypeFields.relatedDocuments.relatedDocument9.title, \"url\" : post.AllPostTypeFields.relatedDocuments.relatedDocument9.mediaItemUrl})\n}\n\nif (post.AllPostTypeFields.relatedDocuments.relatedDocument10 != null)\n{\n if(post.AllPostTypeFields.relatedDocuments.relatedDocumentTitle10 != null)\n relatedDocuments.push({\"title\": post.AllPostTypeFields.relatedDocuments.relatedDocumentTitle10, \"url\" : post.AllPostTypeFields.relatedDocuments.relatedDocument10.mediaItemUrl})\nelse\nrelatedDocuments.push({\"title\": post.AllPostTypeFields.relatedDocuments.relatedDocument10.title, \"url\" : post.AllPostTypeFields.relatedDocuments.relatedDocument10.mediaItemUrl})\n\n}\nif (post.AllPostTypeFields.relatedLinks.relatedLink1 != null)\nrelatedLinks.push({ \"id\": 0, \"title\": post.AllPostTypeFields.relatedLinks.relatedLink1.title, \"url\" : post.AllPostTypeFields.relatedLinks.relatedLink1.url, \"target\": post.AllPostTypeFields.relatedLinks.relatedLink1.target});\n\nif (post.AllPostTypeFields.relatedLinks.relatedLink2 != null)\nrelatedLinks.push({ \"id\": 1, \"title\": post.AllPostTypeFields.relatedLinks.relatedLink2.title, \"url\" : post.AllPostTypeFields.relatedLinks.relatedLink2.url, \"target\": post.AllPostTypeFields.relatedLinks.relatedLink2.target});\n\nif (post.AllPostTypeFields.relatedLinks.relatedLink3 != null)\nrelatedLinks.push({ \"id\": 2, \"title\": post.AllPostTypeFields.relatedLinks.relatedLink3.title, \"url\" : post.AllPostTypeFields.relatedLinks.relatedLink3.url, \"target\": post.AllPostTypeFields.relatedLinks.relatedLink3.target});\n\nif (post.AllPostTypeFields.relatedLinks.relatedLink4 != null)\nrelatedLinks.push({ \"id\": 3, \"title\": post.AllPostTypeFields.relatedLinks.relatedLink4.title, \"url\" : post.AllPostTypeFields.relatedLinks.relatedLink4.url, \"target\": post.AllPostTypeFields.relatedLinks.relatedLink4.target});\n\nif (post.AllPostTypeFields.relatedLinks.relatedLink5 != null)\nrelatedLinks.push({ \"id\": 4, \"title\": post.AllPostTypeFields.relatedLinks.relatedLink5.title, \"url\" : post.AllPostTypeFields.relatedLinks.relatedLink5.url, \"target\": post.AllPostTypeFields.relatedLinks.relatedLink5.target});\n\nif (post.AllPostTypeFields.relatedLinks.relatedLink6 != null)\nrelatedLinks.push({ \"id\": 5, \"title\": post.AllPostTypeFields.relatedLinks.relatedLink6.title, \"url\" : post.AllPostTypeFields.relatedLinks.relatedLink6.url, \"target\": post.AllPostTypeFields.relatedLinks.relatedLink6.target});\n\nif (post.AllPostTypeFields.relatedLinks.relatedLink7 != null)\nrelatedLinks.push({ \"id\": 6, \"title\": post.AllPostTypeFields.relatedLinks.relatedLink7.title, \"url\" : post.AllPostTypeFields.relatedLinks.relatedLink7.url, \"target\": post.AllPostTypeFields.relatedLinks.relatedLink7.target});\n\nif (post.AllPostTypeFields.relatedLinks.relatedLink8 != null)\nrelatedLinks.push({ \"id\": 7, \"title\": post.AllPostTypeFields.relatedLinks.relatedLink8.title, \"url\" : post.AllPostTypeFields.relatedLinks.relatedLink8.url, \"target\": post.AllPostTypeFields.relatedLinks.relatedLink8.target});\n\nif (post.AllPostTypeFields.relatedLinks.relatedLink9 != null)\nrelatedLinks.push({ \"id\": 8, \"title\": post.AllPostTypeFields.relatedLinks.relatedLink9.title, \"url\" : post.AllPostTypeFields.relatedLinks.relatedLink9.url, \"target\": post.AllPostTypeFields.relatedLinks.relatedLink9.target});\n\nif (post.AllPostTypeFields.relatedLinks.relatedLink10 != null)\nrelatedLinks.push({ \"id\": 9, \"title\": post.AllPostTypeFields.relatedLinks.relatedLink10.title, \"url\" : post.AllPostTypeFields.relatedLinks.relatedLink10.url, \"target\": post.AllPostTypeFields.relatedLinks.relatedLink10.target});\n\n\n\nif (post.AllPostTypeFields.relatedSectionPages.relatedPage1 != null)\n{\nrelatedPages.push({ \"id\": 0, \"title\": post.AllPostTypeFields.relatedSectionPages.relatedPage1.title, \"url\" : post.AllPostTypeFields.relatedSectionPages.relatedPage1.url, \"target\": post.AllPostTypeFields.relatedSectionPages.relatedPage1.target,\"imagetitle\": \"\", \"imageurl\" : \"\"});\n}\nif (post.AllPostTypeFields.relatedSectionPages.relatedPage2 != null)\n{\nrelatedPages.push({ \"id\": 1, \"title\": post.AllPostTypeFields.relatedSectionPages.relatedPage2.title, \"url\" : post.AllPostTypeFields.relatedSectionPages.relatedPage2.url, \"target\": post.AllPostTypeFields.relatedSectionPages.relatedPage2.target,\"imagetitle\": \"\", \"imageurl\" : \"\"});\n}\nif (post.AllPostTypeFields.relatedSectionPages.relatedPage3 != null)\n{\nrelatedPages.push({ \"id\": 2, \"title\": post.AllPostTypeFields.relatedSectionPages.relatedPage3.title, \"url\" : post.AllPostTypeFields.relatedSectionPages.relatedPage3.url, \"target\": post.AllPostTypeFields.relatedSectionPages.relatedPage3.target,\"imagetitle\": \"\", \"imageurl\" : \"\"});\n}\nif (post.AllPostTypeFields.relatedSectionPages.relatedPage4 != null)\n{\nrelatedPages.push({ \"id\": 3, \"title\": post.AllPostTypeFields.relatedSectionPages.relatedPage4.title, \"url\" : post.AllPostTypeFields.relatedSectionPages.relatedPage4.url, \"target\": post.AllPostTypeFields.relatedSectionPages.relatedPage4.target,\"imagetitle\": \"\", \"imageurl\" : \"\"});\n}\nif (post.AllPostTypeFields.relatedSectionPages.relatedPage5 != null)\n{\nrelatedPages.push({ \"id\": 4, \"title\": post.AllPostTypeFields.relatedSectionPages.relatedPage5.title, \"url\" : post.AllPostTypeFields.relatedSectionPages.relatedPage5.url, \"target\": post.AllPostTypeFields.relatedSectionPages.relatedPage5.target,\"imagetitle\": \"\", \"imageurl\" : \"\"});\n}\nif (post.AllPostTypeFields.relatedSectionPages.relatedPage6 != null)\n{\n relatedPages.push({ \"id\": 5, \"title\": post.AllPostTypeFields.relatedSectionPages.relatedPage6.title, \"url\" : post.AllPostTypeFields.relatedSectionPages.relatedPage6.url, \"target\": post.AllPostTypeFields.relatedSectionPages.relatedPage6.target,\"imagetitle\": \"\", \"imageurl\" : \"\"});\n}\nif (post.AllPostTypeFields.relatedSectionPages.relatedPage7 != null)\n{\nrelatedPages.push({ \"id\": 6, \"title\": post.AllPostTypeFields.relatedSectionPages.relatedPage7.title, \"url\" : post.AllPostTypeFields.relatedSectionPages.relatedPage7.url, \"target\": post.AllPostTypeFields.relatedSectionPages.relatedPage7.target,\"imagetitle\": \"\", \"imageurl\" : \"\"});\n}\nif (post.AllPostTypeFields.relatedSectionPages.relatedPage8 != null)\n{\nrelatedPages.push({ \"id\": 7, \"title\": post.AllPostTypeFields.relatedSectionPages.relatedPage8.title, \"url\" : post.AllPostTypeFields.relatedSectionPages.relatedPage8.url, \"target\": post.AllPostTypeFields.relatedSectionPages.relatedPage8.target,\"imagetitle\": \"\", \"imageurl\" : \"\"});\n}\nif (post.AllPostTypeFields.relatedSectionPages.relatedPage9 != null)\n{\nrelatedPages.push({ \"id\": 8, \"title\": post.AllPostTypeFields.relatedSectionPages.relatedPage9.title, \"url\" : post.AllPostTypeFields.relatedSectionPages.relatedPage9.url, \"target\": post.AllPostTypeFields.relatedSectionPages.relatedPage9.target,\"imagetitle\": \"\", \"imageurl\" : \"\"});\n}\nif (post.AllPostTypeFields.relatedSectionPages.relatedPage10 != null)\n{\nrelatedPages.push({ \"id\": 9, \"title\": post.AllPostTypeFields.relatedSectionPages.relatedPage10.title, \"url\" : post.AllPostTypeFields.relatedSectionPages.relatedPage10.url, \"target\": post.AllPostTypeFields.relatedSectionPages.relatedPage10.target,\"imagetitle\": \"\", \"imageurl\" : \"\"});\n}\nif (post.AllPostTypeFields.contentImage.contentImage1 != null)\nrelatedImages.push({ \"id\": 1,\"imagetitle\": post.AllPostTypeFields.contentImage.contentImage1.title, \"src\" : post.AllPostTypeFields.contentImage.contentImage1.mediaItemUrl, width: 4,height: 3});\n\nif (post.AllPostTypeFields.contentImage.contentImage2 != null)\nrelatedImages.push({ \"id\": 2,\"imagetitle\": post.AllPostTypeFields.contentImage.contentImage2.title, \"src\" : post.AllPostTypeFields.contentImage.contentImage2.mediaItemUrl, width: 4,height: 3});\n\nif (post.AllPostTypeFields.contentImage.contentImage3 != null)\nrelatedImages.push({ \"id\": 3,\"imagetitle\": post.AllPostTypeFields.contentImage.contentImage3.title, \"src\" : post.AllPostTypeFields.contentImage.contentImage3.mediaItemUrl, width: 4,height: 3});\n\nif (post.AllPostTypeFields.contentImage.contentImage4 != null)\nrelatedImages.push({ \"id\": 4,\"imagetitle\": post.AllPostTypeFields.contentImage.contentImage4.title, \"src\" : post.AllPostTypeFields.contentImage.contentImage4.mediaItemUrl, width: 4,height: 3});\n\nif (post.AllPostTypeFields.contentImage.contentImage5 != null)\nrelatedImages.push({ \"id\": 5,\"imagetitle\": post.AllPostTypeFields.contentImage.contentImage5.title, \"src\" : post.AllPostTypeFields.contentImage.contentImage5.mediaItemUrl, width: 4,height: 3});\n\nif (post.AllPostTypeFields.contentImage.contentImage6 != null)\nrelatedImages.push({ \"id\": 6,\"imagetitle\": post.AllPostTypeFields.contentImage.contentImage6.title, \"src\" : post.AllPostTypeFields.contentImage.contentImage6.mediaItemUrl, width: 4,height: 3});\n\nif (post.AllPostTypeFields.contentImage.contentImage7 != null)\nrelatedImages.push({ \"id\": 7,\"imagetitle\": post.AllPostTypeFields.contentImage.contentImage7.title, \"src\" : post.AllPostTypeFields.contentImage.contentImage7.mediaItemUrl, width: 4,height: 3});\n\nif (post.AllPostTypeFields.contentImage.contentImage8 != null)\nrelatedImages.push({ \"id\": 8,\"imagetitle\": post.AllPostTypeFields.contentImage.contentImage8.title, \"src\" : post.AllPostTypeFields.contentImage.contentImage8.mediaItemUrl, width: 4,height: 3});\n\nif (post.AllPostTypeFields.contentImage.contentImage9 != null)\nrelatedImages.push({ \"id\": 9,\"imagetitle\": post.AllPostTypeFields.contentImage.contentImage9.title, \"src\" : post.AllPostTypeFields.contentImage.contentImage9.mediaItemUrl, width: 4,height: 3});\n\nif (post.AllPostTypeFields.contentImage.contentImage10 != null)\nrelatedImages.push({ \"id\": 10,\"imagetitle\": post.AllPostTypeFields.contentImage.contentImage10.title, \"src\" : post.AllPostTypeFields.contentImage.contentImage10.mediaItemUrl, width: 4,height: 3});\n\n return (\n \n \n
\n
\n
\n
\n

\n \n
\n
\n \n \n
\n
\n
\n
\n
\n\n
\n )\n}\nexport const query = graphql`\nquery GET_COASTGUARD($id: ID!) {\n wpgraphql {\n coastguard(id: $id) {\n title\n content(format: RENDERED)\n slug\n keywords {\n nodes {\n name\n }\n }\n AllPostTypeFields {\n contentImage{\n contentImage1 {\n mediaItemUrl\n title\n }\n contentImage2 {\n mediaItemUrl\n title\n }\n contentImage3 {\n mediaItemUrl\n title\n }\n contentImage4 {\n mediaItemUrl\n title\n }\n contentImage5 {\n mediaItemUrl\n title\n }\n contentImage6 {\n mediaItemUrl\n title\n }\n contentImage7{\n mediaItemUrl\n title\n }\n contentImage8 {\n mediaItemUrl\n title\n }\n contentImage9 {\n mediaItemUrl\n title\n }\n contentImage10 {\n mediaItemUrl\n title\n }\n\n }\n relatedLinks {\n relatedLink1 {\n title\n url\n target\n }\n relatedLink2 {\n title\n url\n target\n }\n relatedLink3 {\n title\n url\n target\n }\n relatedLink4 {\n title\n url\n target\n }\n relatedLink5 {\n title\n url\n target\n }\n relatedLink6 {\n title\n url\n target\n }\n relatedLink7 {\n title\n url\n target\n }\n relatedLink8 {\n title\n url\n target\n }\n relatedLink9 {\n title\n url\n target\n }\n relatedLink10 {\n title\n url\n target\n }\n }\n relatedSectionPages {\n relatedPage1 {\n title\n url\n target\n }\n relatedPage2 {\n title\n url\n target\n }\n relatedPage3 {\n title\n url\n target\n }\n relatedPage4 {\n title\n url\n target\n }\n relatedPage5 {\n title\n url\n target\n }\n relatedPage6 {\n title\n url\n target\n }\n relatedPage7 {\n title\n url\n target\n }\n relatedPage8 {\n title\n url\n target\n }\n relatedPage9 {\n title\n url\n target\n }\n relatedPage10 {\n title\n url\n target\n }\n }\n relatedDocuments {\n relatedDocumentTitle1\n relatedDocumentTitle2\n relatedDocumentTitle3\n relatedDocumentTitle4\n relatedDocumentTitle5\n relatedDocumentTitle6\n relatedDocumentTitle7\n relatedDocumentTitle8\n relatedDocumentTitle9\n relatedDocumentTitle10\n relatedDocument1 {\n mediaItemUrl\n title\n }\n relatedDocument2 {\n mediaItemUrl\n title\n }\n relatedDocument3 {\n mediaItemUrl\n title\n }\n relatedDocument4 {\n mediaItemUrl\n title\n }\n relatedDocument5 {\n mediaItemUrl\n title\n }\n relatedDocument6 {\n mediaItemUrl\n title\n }\n relatedDocument7 {\n mediaItemUrl\n title\n }\n relatedDocument8 {\n mediaItemUrl\n title\n }\n relatedDocument9 {\n mediaItemUrl\n title\n }\n relatedDocument10 {\n mediaItemUrl\n title\n }\n }\n }\n }\n }\n}\n`","import React, { useState, useEffect} from 'react';\nimport axios from 'axios';\nimport { sidebarStyle } from '../style/sideBarStyle';\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\nimport Mail2U from '../components/mail2U';\nimport { Link } from \"gatsby\"\n\nconst images = require.context('../images/weather', true);\n\nconst SideBar = (props) => {\n const [fetchUrl, setFetchUrl] = useState(\"\")\n const urlString = `/results?q=${fetchUrl}`\n const hideOnMobile = useMediaQuery('(min-width:821px)');\n const [data, setData] = useState([]);\n //const [isLoading, setIsLoading] = useState(false);\n const [isError, setIsError] = useState(false);\n const [weatherIcon, setWeatherIcon] = useState(images(\"./blank.gif\"));\n\n \n const handleSubmit = (event) => {\n event.preventDefault();\n window.location.href=urlString;\n }\n\n let Class=\"col-6-12 indexrightsidefont\";\n if (props.FullWidth)\n Class=\"indexrightsidefont\"\n\n useEffect(() => {\n const fetchData = async () => {\n setIsError(false)\n // setIsLoading(true)\n try {\n const result = await axios(process.env.GATSBY_SIDEBAR_API)\n setData(result.data)\n setWeatherIcon(images('./'+result.data.weatherIcon));\n } catch (error) {\n setIsError(true)\n console.log(error);\n }\n // setIsLoading(false)\n }\n fetchData();\n },[])\n\n if (isError) return
data is currently unavailable
;\n return (\n \n
\n \n
\n
\n
\n \n setFetchUrl(event.target.value)}\n />\n \n \n
\n\n
\n

\n \n Arrivals & Departures\n \n

\n
    \n
  • \n Arrived\n
    \n {data.Arrived}\n
  • \n
  • \n Departed\n
    \n {data.Departed}\n
  • \n
\n
\n\n
\n

\n \n Tides at St Helier\n \n

\n
    \n
  • \n
  • \n
\n {/* \n

\n Marina gates {data.marinaStatus}\n
\n ({data.marinaStatus===\"open\" ? \"closing\" : \"opening\"} {data.marinaTime})\n

\n */}\n
\n\n
\n

\n \n Weather and forecasts\n \n

\n

\n {data.weatherDate}\n

\n\n
\n \n \"\"\n \n

\n max\n
\n {data.weatherMaxTemp}°c\n

\n
\n
\n\n {hideOnMobile && }\n \n
\n
\n
\n )\n}\nexport default SideBar\n"],"sourceRoot":""}