From f5c91121578f9ab1838fef8dc204adb13a0d81e6 Mon Sep 17 00:00:00 2001 From: Daan Rosbergen Date: Wed, 21 Jun 2017 18:22:42 +0200 Subject: [PATCH] Fix hub details being empty --- src/containers/HubsDetails.js | 2 +- src/containers/HubsDetails.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/containers/HubsDetails.js b/src/containers/HubsDetails.js index 784198b..9ff87a7 100644 --- a/src/containers/HubsDetails.js +++ b/src/containers/HubsDetails.js @@ -10,7 +10,7 @@ class HubsDetails extends Component { constructor(props) { super(props); this.state = { - hub: {}, + hub: this.props.location.state.hub, buildings: [], selectedBuilding: false }; diff --git a/src/containers/HubsDetails.test.js b/src/containers/HubsDetails.test.js index 028acb4..4a59948 100644 --- a/src/containers/HubsDetails.test.js +++ b/src/containers/HubsDetails.test.js @@ -7,7 +7,7 @@ it("renders without crashing", () => { const div = document.createElement("div"); ReactDOM.render( - + , div );