Skip to content

Commit

Permalink
changes the conditionnal rendering in the App container
Browse files Browse the repository at this point in the history
  • Loading branch information
SylvainJunca committed Jan 14, 2019
1 parent 8470e03 commit f1e5a23
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/containers/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,18 @@ class App extends Component {
return robot.name.toLowerCase().includes(searchfield.toLowerCase());
})

if (robots){
return (

return robots?
(
<div className='tc'>
<h1 className='f1'>RoboFriends</h1>
<SearchBox searchChange={this.onSearchChange}/>
<Scroll>
<CardList robots= {filteredRobots} />
</Scroll>
</div>
)
} else {
return <h1>Loading</h1>
}
) :
<h1>Loading</h1>
}
}

Expand Down

0 comments on commit f1e5a23

Please sign in to comment.