File size: 928 Bytes
f5071ca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import React from "react";
import ReactDOM from "react-dom";
import "./TVShowItemPage.scss";
import { connect } from "react-redux";
import ItemPageOverview from "../../Components/ItemPageOverview/ItemPageOverview";
import { selectTVItems } from "../../Redux/TVShow/tv-selectors";
import { getTvShows } from "../../Redux/TVShow/tv-actions";

class TVShowItemPage extends React.Component {
  componentDidMount() {
    this.props.dispatch(getTvShows());
    ReactDOM.findDOMNode(this).scrollIntoView();
  }

  render() {
    return (
      <div className="movie-item-page">

        <ItemPageOverview

          params={this.props.match.params}

          state={this.props.location ? this.props.location.state : ""}

          tvshow

        />

      </div>
    );
  }
}

const mapStateToProps = state => ({
  tvItems: selectTVItems(state)
});

export default connect(mapStateToProps)(TVShowItemPage);