import React from 'react'; import '../app.css'; class MovieObject { constructor(object) { this.id = object.id; this.title = object.title; this.year = object.year; // Check if object.poster != undefined this.poster = object.poster; this.matchedInPlex = object.matchedInPlex; this.overview = object.overview; } requestExisting(movie) { console.log('Exists', movie); } requestMovie(id) { fetch('http://localhost:31459/api/v1/plex/request/' + id, { method: 'POST' }); } getElement() { var posterPath = 'https://image.tmdb.org/t/p/w154' + this.poster; var buttonState; if (this.matchedInPlex) { buttonState = ; } else { buttonState = ; } return (