diff --git a/src/components/NavBar.js b/src/components/NavBar.js index 640c1d332..2ff47ca16 100644 --- a/src/components/NavBar.js +++ b/src/components/NavBar.js @@ -29,6 +29,7 @@ class NavBar extends Component { this.setState({ selectedCustomer: customer }); + console.log(customer.name) } onSelectMovie = (movieId) => { @@ -80,6 +81,16 @@ class NavBar extends Component { render() { + const customerSelected = (this.state.selectedCustomer) ? + ( + selected customer is: {this.state.selectedCustomer.name} + ) : null; + + const movieSelected = (this.state.selectedMovie) ? + ( + selected movie is: {this.state.selectedMovie.title} + ) : null; + return ( @@ -87,6 +98,10 @@ class NavBar extends Component { {this.props.allCustomers} {this.props.search} + + { customerSelected } + { movieSelected } + (
selected customer is: {this.state.selectedCustomer.name}
selected movie is: {this.state.selectedMovie.title}