Skip to content

Commit

Permalink
Fix mood selection for TagMovie
Browse files Browse the repository at this point in the history
  • Loading branch information
lin-erik authored Aug 3, 2018
2 parents a2d2b13 + 20c7958 commit b01e6e4
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions client/components/TagMovie.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class TagMovie extends React.Component {
'uncomfortable'
],
moods: [],
selected: 'whimsical',
selected: '',
//movie and user should eventually come from props after testing
movie: this.props.movie,
user: this.props.user
Expand Down Expand Up @@ -62,10 +62,10 @@ class TagMovie extends React.Component {

axios
.post('/save', movie)
.then((response) => {
.then(response => {
this.props.getUserHistory(this.props.user);
})
.catch((err) => console.log('FrontEnd err sending movie to server', err));
.catch(err => console.log('FrontEnd err sending movie to server', err));
}

handleDeleteMood(e) {
Expand All @@ -88,7 +88,11 @@ class TagMovie extends React.Component {
<select
onChange={this.handleChangeMood}
className="select is-multiple"
defaultValue=""
>
<option value="" disabled hidden>
Choose Mood
</option>
{this.state.dbMoods.map((option, index) => {
return (
<option value={option} key={index}>
Expand Down Expand Up @@ -126,7 +130,7 @@ class TagMovie extends React.Component {
</div>
</div>
<div className="column is-one-fifth">
<MovieCard movie={this.props.movie} user={this.props.user}/>
<MovieCard movie={this.props.movie} user={this.props.user} />
</div>
</div>
);
Expand Down

0 comments on commit b01e6e4

Please sign in to comment.