Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement