From 244f6061335970e597421ff956adaaf5494aa338 Mon Sep 17 00:00:00 2001 From: KevinMidboe Date: Sat, 3 Jun 2017 11:12:28 +0200 Subject: [PATCH] Changed the way html for the object is created, but need to do this with React native functions. Also added a few functions that will be for requesting items. --- client/app/components/MovieObject.jsx | 35 +++++++++++++++++++++------ 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/client/app/components/MovieObject.jsx b/client/app/components/MovieObject.jsx index f91d321..eaf4667 100644 --- a/client/app/components/MovieObject.jsx +++ b/client/app/components/MovieObject.jsx @@ -6,16 +6,37 @@ class MovieObject { this.title = object.title; this.year = object.year; // Check if object.poster != undefined - this.poster = 'https://image.tmdb.org/t/p/w150' + object.poster; + this.poster = object.poster; + this.matchedInPlex = object.matchedInPlex + } + + requestExisting(id) { + console.log('Exists', id) + } + + requestMovie(id) { + console.log(id); } getElement() { - var returnString = [ -

{this.title} ({this.year})

, - , -

- ] - return returnString; + var returnList = [] + + returnList.push(

{this.title} ({this.year})

) + + var posterPath, buttonState; + if (this.poster != undefined) { + posterPath = 'https://image.tmdb.org/t/p/w150' + this.poster; + } + returnList.push(); + + if (this.matchedInPlex) { + returnList.push() + } else { + returnList.push() + } + + returnList.push(

); + return returnList; } }