Commit 8c79ad3c authored by Florent Chehab's avatar Florent Chehab

Warning removed and cleaning

parent 619dd7d0
......@@ -96,7 +96,8 @@ const styles = theme => ({
},
myPaper: {
padding: 16
}
},
null:{}
});
class App extends React.Component {
......@@ -113,8 +114,8 @@ class App extends React.Component {
};
componentDidMount() {
if (this.props.countries.countries.length == 0 || this.props.invalidated) {
console.log("here mother uc", this.props.countries.countries);
if (this.props.countries.fetched.countries.length == 0 || this.props.invalidated) {
console.log("here mother uc", this.props.countries.fetched.countries);
this.props.fetchData();
}
}
......@@ -154,7 +155,7 @@ class App extends React.Component {
open={this.state.open}
>
<div className={classNames(classes.toolbarIcon)}>
<div className={(!this.state.open) && classes.hideIt}>
<div className={classNames((!this.state.open) && classes.hideIt, classes.null)}>
<Chip
avatar={<Avatar> <SchoolIcon /> </Avatar>}
label="Outgoing REX"
......@@ -199,14 +200,8 @@ App.propTypes = {
const mapStateToProps = (state) => {
return {
countries: {
countries: state.countries.fetched.countries,
fetchedAt: state.countries.fetched.fetchedAt,
hasError: state.countries.hasError,
isLoading: state.countries.isLoading,
invalidated: state.countries.invalidated
}
};
countries: state.countries
}
};
const mapDispatchToProps = (dispatch) => {
......
......@@ -27,13 +27,14 @@ class UnivMarkers extends Component {
selected_main_campus.push({
univ_name: univ.name,
lat: campus.lat,
lon: campus.lon
lon: campus.lon,
id: univ.id
})
}
return (
selected_main_campus.map((el) => (
<Marker position={[el.lat, el.lon]}>
<Marker key={el.id} position={[el.lat, el.lon]}>
<Popup>
{el.univ_name}
</Popup>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment