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KA,EAAOG,WACZ,0BAAKH,EAAOwB,kBAQ1B,qFAEE,qBACE9C,KAAK,qEAAqE+C,OAAO,SAASC,IAAI,aAC9FrD,MAAO,CACLL,MAAO,UACP2D,OAAQ,UACRC,WAAY,MACZC,YAAa,OAEfzD,UAAWwB,EAAU7B,MARvB,qCAFF,2EAiBA,mDACA,6FAIA,qKAKA,yBACE,qBACEW,KAAK,wDAAwD+C,OAAO,SAASC,IAAI,aACjFrD,MAAO,CACLL,MAAO,UACP2D,OAAQ,WAEVvD,UAAWwB,EAAU7B,MANvB,mEAYF,kFACA,mCAEE,qBACEW,KAAK,yDAAyD+C,OAAO,SAASC,IAAI,aAClFrD,MAAO,CACLL,MAAO,UACP2D,OAAQ,UACRC,WAAY,MACZC,YAAa,OAEfzD,UAAWwB,EAAU7B,MARvB,mBAFF,gIAiBA,0DACA,sHAGE,qBACEW,KAAK,mEAAmE+C,OAAO,SAASC,IAAI,aAC5FrD,MAAO,CACLL,MAAO,UACP2D,OAAQ,UACRC,WAAY,OAEdxD,UAAWwB,EAAU7B,MAPvB,wBAHF,QAmBJ,gBAAC,IAAD,CAAMyC,MAAI,EAACC,GAAI,GAAIC,GAAI,GAAIC,GAAI,EAAGC,GAAI,GACpC,gBAAC,IAAD,a,8DC1LZ,UAXc,WACZ,OACE,uBAAKvC,MAAO,CAAEyD,MAAO,OAAQb,UAAW,SAAUc,QAAS,UACzD,uBAAK1D,MAAO,CAAEL,MAAO,mBAAoBgD,UAAW,OAAQe,QAAS,UACnE,gBAAC,IAAD,CAAiBC,KAAMC,EAAAA,MACvB,wBAAM5D,MAAO,CAACuD,WAAW,SAAzB","sources":["webpack://Jersey-Met-Redesign/./src/components/Sidebar/PremiumServices/index.js","webpack://Jersey-Met-Redesign/./src/pages/earthquakes.js","webpack://Jersey-Met-Redesign/./src/pages/loading.js"],"sourcesContent":["import React from 'react'\nimport { Link } from \"gatsby\";\nimport logo from \"../../../images/Jersey-Met-Premium-Services-Logo.svg\"\nimport \"../Sidebar.scss\";\nimport { makeStyles, } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n \"&:hover\": {\n color: \"#b60011\", \n },\n \"&:focus\": {\n backgroundColor: \"hsl(208, 89%, 34%)\",\n color: \"#fff\"\n }\n },\n}));\n\nconst PremiumServices = () => {\n const hoverStyle = useStyles()\n return (\n \n )\n}\n\nexport default PremiumServices","import React, { useEffect, useState } from \"react\"\nimport Grid from \"@material-ui/core/Grid\"\nimport Layout from \"../components/layout\"\nimport PremiumServices from \"../components/Sidebar/PremiumServices\"\nimport axios from \"axios\"\nimport Loading from \"./loading\"\nimport Button from '@material-ui/core/Button';\nimport \"./resendButton.scss\"\nimport Seo from \"../components/seo\"\nimport { makeStyles, } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n \"&:focus\": {\n backgroundColor: \"hsl(208, 89%, 34%) !important\",\n color: \"#fff !important\"\n },\n \"&:hover\": {\n color:\"#b60011 !important\"\n }\n },\n}));\n\nconst EarthQuakes = () => {\n \n const [data, setData] = useState([])\n const [url, setUrl] = useState(process.env.MET_EARTHQUAKES)\n const [loading, setloading] = useState(true)\n const [error, setError] = useState(false)\n const [latestDate, setLatestDate] = useState([])\n const [latestMagnitude, setLatestMagnitude] = useState([])\n const linkFocus = useStyles()\n\n useEffect(() => {\n const fetchData = async () => {\n setError(false)\n setloading(true)\n try {\n const result = await axios(url)\n setData(result.data.earthquakes)\n setLatestDate(result.data.earthquakes[0].Date)\n setLatestMagnitude(result.data.earthquakes[0].Magnitude)\n } catch (error) {\n setError(true)\n console.log(error)\n }\n setloading(false)\n }\n fetchData()\n }, [url])\n\n return (\n \n \n \n
\n \n

\n Earthquakes\n

\n
\n \n \n \n
\n\n

Most recent earthquake​​​​

\n

\n The last earthquake in the Channel Islands was on {latestDate}{\" \"}\n and measured a magnitude of {latestMagnitude}.\n

\n

Previous earth​quakes in the Channel Islands

\n

\n The Jersey Meteorological Dep​artment support the British\n Geological Survey (BGS) in recording earthquakes in the\n Channel Islands area and further afield.\n

\n\n {error ? (\n \n
\n

\n Sorry, the earthquake information is not available at the\n moment. Please check back later.\n

\n
\n
\n
\n ) : (\n loading ? (\n \n ) : (\n
\n \n \n \n \n \n \n \n \n \n \n \n \n {data.map((result, index) => ( \n \n \n \n \n \n \n \n \n ))}\n \n
DateTimeLatitude and longitudeDepth (km)MagnitudeIntensity
\n {result.Date}\n {result.Time}{result[\"Latitude and longitude\"]}{result[\"Depth(km)\"]}{result.Magnitude}{result.Intensity}
\n
\n )\n )}\n

\n For the most recent and up to date information, visit the\n \n British Geological Survey website\n \n which also includes earthquakes from around the UK in the last\n 50 days.\n

\n

Real time seismograms

\n

\n You can see real time seismograms from St Aubin seismic\n station.\n

\n

\n Select 'JSA (Jersey)' from the drop down list, then 'short\n period' for local earthquake information (within 300 miles /\n 483 kilometres).\n

\n

\n \n Real time seismograms on the British Geological Survey\n website\n \n

\n

Earthquakes around the British Isles interactive map

\n

\n See the\n \n interactive map\n \n provided by the British Geological Survey which allows you to\n see earthquakes around the British Isles for the last 50 days.\n

\n

Have you felt an earthquake?

\n

\n If you have felt an earthquake, let the British Geological\n Survey know by filling in their\n \n online questionnaire\n \n .\n

\n
\n
\n
\n \n \n \n
\n
\n
\n
\n )\n}\nexport default EarthQuakes\n","import React from \"react\"\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faSpinner } from \"@fortawesome/free-solid-svg-icons\";\n\nconst Loading = () => {\n return (\n
\n
\n \n Loading...\n
\n
\n )\n }\n\n export default Loading;"],"names":["useStyles","makeStyles","theme","root","color","backgroundColor","hoverStyle","id","className","style","backgroundImage","height","backgroundRepeat","backgroundPosition","href","Link","activeClassName","to","useState","data","setData","process","url","setUrl","loading","setloading","error","setError","latestDate","setLatestDate","latestMagnitude","setLatestMagnitude","linkFocus","useEffect","fetchData","axios","result","earthquakes","Date","Magnitude","console","log","title","description","item","xs","sm","md","lg","paddingLeft","container","spacing","marginTop","textAlign","onClick","overflowX","map","index","key","Time","Intensity","target","rel","cursor","marginLeft","marginRight","width","display","icon","faSpinner"],"sourceRoot":""}