import React from 'react' import { Link } from 'react-router' import ListDetails from '../list/details' import ListPosters from '../list/posters' function ShowButtons(props) { const imdbLink = `http://www.imdb.com/title/${props.show.imdb_id}`; return (
IMDB Details
); } export default class ShowList extends React.Component { componentWillMount() { this.props.fetchShows(this.props.showsUrl); } render() { const shows = this.props.showStore.shows; const selectedShowId = this.props.showStore.selectedImdbId; let index = shows.map((el) => el.imdb_id).indexOf(selectedShowId); if (index === -1) { index = 0; } const selectedShow = shows[index]; return (
{selectedShow && }
); } }