Client feature #5

Merged
KevinMidboe merged 9 commits from client_feature into master 2017-06-03 09:19:01 +00:00
Showing only changes of commit 47269ebc70 - Show all commits

View File

@@ -0,0 +1,22 @@
import React from 'react';
class MovieObject {
constructor(object) {
this.id = object.id;
this.title = object.title;
this.year = object.year;
// Check if object.poster != undefined
this.poster = 'https://image.tmdb.org/t/p/w150' + object.poster;
}
getElement() {
var returnString = [
<p>{this.title} ({this.year})</p>,
<img src={this.poster}></img>,
<br></br>
]
return returnString;
}
}
export default MovieObject;