SHARE
TWEET

Untitled

a guest Aug 23rd, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const HospitalTemplate = ({ data }) => {
  2.   let hospital = data.allGeoFeature.edges[0].node.featureFields;
  3.   let position = [hospital.LATITUDE, hospital.LONGITUDE];
  4.   return (
  5.     <Layout>
  6.     <h1>{hospital.NAME}</h1>
  7.     <p>{hospital.ADDRESS_1} {hospital.POSTCODE}</p>
  8.     <p>{hospital.NUMBER}</p>
  9.     <p>{hospital.TYPE}</p>
  10.  
  11.  
  12.     {typeof window !== 'undefined' &&
  13.         <LeafletMap
  14.           position={position}
  15.           zoom={13}
  16.           markerText={hospital.NAME}
  17.         />
  18.     }
  19.   </Layout>
  20. );
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top