Changed movieObject ot pass full object, not just it's id when clicked
This commit is contained in:
@@ -11,8 +11,8 @@ class MovieObject {
|
|||||||
this.overview = object.overview;
|
this.overview = object.overview;
|
||||||
}
|
}
|
||||||
|
|
||||||
requestExisting(id) {
|
requestExisting(movie) {
|
||||||
console.log('Exists', id)
|
console.log('Exists', movie)
|
||||||
}
|
}
|
||||||
|
|
||||||
requestMovie(id) {
|
requestMovie(id) {
|
||||||
@@ -33,9 +33,9 @@ class MovieObject {
|
|||||||
returnList.push(<img src={posterPath}></img>);
|
returnList.push(<img src={posterPath}></img>);
|
||||||
|
|
||||||
if (this.matchedInPlex) {
|
if (this.matchedInPlex) {
|
||||||
returnList.push(<button onClick={() => this.requestExisting(this.id)}>Request anyway</button>)
|
returnList.push(<button onClick={() => this.requestExisting(this)}>Request anyway</button>)
|
||||||
} else {
|
} else {
|
||||||
returnList.push(<button onClick={() => this.requestMovie(this.id)}>Request</button>)
|
returnList.push(<button onClick={() => this.requestMovie(this)}>Request</button>)
|
||||||
}
|
}
|
||||||
|
|
||||||
returnList.push(<span>{this.overview}</span>);
|
returnList.push(<span>{this.overview}</span>);
|
||||||
|
|||||||
Reference in New Issue
Block a user