Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const HospitalTemplate = ({ data }) => {
- let hospital = data.allGeoFeature.edges[0].node.featureFields;
- let position = [hospital.LATITUDE, hospital.LONGITUDE];
- return (
- <Layout>
- <h1>{hospital.NAME}</h1>
- <p>{hospital.ADDRESS_1} {hospital.POSTCODE}</p>
- <p>{hospital.NUMBER}</p>
- <p>{hospital.TYPE}</p>
- {typeof window !== 'undefined' &&
- <LeafletMap
- position={position}
- zoom={13}
- markerText={hospital.NAME}
- />
- }
- </Layout>
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement