diff --git a/graphql/schema.graphql b/graphql/schema.graphql index db494f7..af4c54f 100644 --- a/graphql/schema.graphql +++ b/graphql/schema.graphql @@ -14,7 +14,10 @@ type Building { significance: String, recommendation: String, latitude: Float, - longitude: Float + longitude: Float, + image_main: String, + image_second: String, + image_third: String } type Query { diff --git a/helpers/createDataObj.js b/helpers/createDataObj.js index 6d0b70b..25a32a1 100644 --- a/helpers/createDataObj.js +++ b/helpers/createDataObj.js @@ -16,7 +16,10 @@ const createDataObj = (data) => { significance: item['Significance Statement'], recommendation: item['Recommendation'], latitude: item['Latitude'], - longitude: item['Longitude'] + longitude: item['Longitude'], + image_main: item['Image Main'], + image_second: item['Image Second'], + image_third: item['Image Third'] }; }); } diff --git a/models/islington.js b/models/islington.js index 971ebd5..2cdae63 100644 --- a/models/islington.js +++ b/models/islington.js @@ -28,7 +28,10 @@ const islingtonSchema = new Schema({ significance: String, recommendation: String, latitude: Number, - longitude: Number + longitude: Number, + image_main: String, + image_second: String, + image_third: String }); const Islington = mongoose.model("Islington", islingtonSchema); diff --git a/src/App.js b/src/App.js index 1e1b7e4..135303d 100644 --- a/src/App.js +++ b/src/App.js @@ -45,6 +45,7 @@ class App extends Component { } render() { + console.log(this.state.buildings) return
{ significance, recommendation, latitude, - longitude } = building + longitude, + image_main, + image_second, + image_third } = building return (
@@ -37,6 +40,9 @@ const BuildingDetails = ({ building }) => {
{ date_local_listing }
{ significance }
{ recommendation }
+ + +
); };