import React from 'react'; import Api from '../api'; // Todo: Make it work! class Show extends React.Component { state = { item: {} } constructor(props) { super(props); this.loadItem(); } render() { let style = { backgroundImage: this.state.item.poster == 'null' || typeof this.state.item.poster === 'undefined' ? '' : 'url(' + config.posterBig + this.state.item.poster + ')' } return (
{style.backgroundImage ? '' : }

{this.state.item.title}

); } loadItem() { Api.searchItemBySlug(this.props.params.item).then((value) => { Api.searchTMDBByID(value.tmdb_id); }); } } export default Show;