Skip to content

Commit

Permalink
add basic styles to home page [WIP]
Browse files Browse the repository at this point in the history
relates #22
  • Loading branch information
jessicasalmon committed Nov 23, 2017
1 parent 855c03f commit 851f6c9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
19 changes: 13 additions & 6 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,19 @@ class App extends Component {

render() {
console.log(this.state.buildings)
return <div>
<Map
{...this.state}
handleBuildingDetails={this.buildingDetails} / >
<BuildingDetails building={this.state.building} />
</div>;
return (
<div>
<div className="fl w-50 pa2">
<Map
{...this.state}
handleBuildingDetails={this.buildingDetails} / >
</div>
<div className="fl w-50 pa2">
{/* logic here to display either list view or detailed view*/}
<BuildingDetails building={this.state.building} />
</div>
</div>
);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/BuildingDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';


const BuildingDetails = ({ building }) => {
const {
const {
street_number,
street_name,
postcode,
Expand Down
10 changes: 5 additions & 5 deletions src/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ class Map extends Component {
render() {
const { buildings, handleBuildingDetails, mapCenter, mapZoom } = this.props;
return (
<Mapbox
style="mapbox://styles/sohilpandya/cja87dmin0ct62sl4jxyo4tzp"
center={ mapCenter }
zoom={ mapZoom }
containerStyle={{ height: "100vh", width: "50vw" }}
<Mapbox
style="mapbox://styles/sohilpandya/cja87dmin0ct62sl4jxyo4tzp"
center={ mapCenter }
zoom={ mapZoom }
containerStyle={{ height: "100vh", width: "100%" }}
movingMethod={'flyTo'}>
<MapLayer
{ ...this.props }
Expand Down

0 comments on commit 851f6c9

Please sign in to comment.