diff --git a/src/components/Search.jsx b/src/components/Search.jsx index 7420023..6b168df 100644 --- a/src/components/Search.jsx +++ b/src/components/Search.jsx @@ -55,7 +55,7 @@ class SearchSong extends React.Component { return (
  • -
    +
    {song.title} {song.artist[0].name}
    @@ -68,7 +68,7 @@ class SearchSong extends React.Component { class SearchSongs extends React.Component { constructor(props) { super(props); - this.state = {songs: null, paginate: null, page: 1} + this.state = {songs: null, paginate: null, page: this.props.page ? this.props.page : 1} } componentDidMount = _ => this.loadSongs(this.props.query, this.state.page); @@ -143,7 +143,7 @@ class SearchDisc extends React.Component {
  • -
    +
    {disc.title} {disc.date && this.getReleaseYear(disc.date)} {disc.artist[0].name}
    @@ -156,7 +156,7 @@ class SearchDisc extends React.Component { class SearchDiscs extends React.Component { constructor(props) { super(props); - this.state = {discs: null, paginate: null, page: 1} + this.state = {discs: null, paginate: null, page: this.props.page ? this.props.page : 1} } componentDidMount = _ => this.loadDiscs(this.props.query, this.state.page); @@ -236,7 +236,7 @@ class SearchArtist extends React.Component { class SearchArtists extends React.Component { constructor(props) { super(props); - this.state = {artists: null, paginate: null, page: 1} + this.state = {artists: null, paginate: null, page: this.props.page ? this.props.page : 1} } componentDidMount = _ => this.loadArtists(this.props.query, this.state.page); @@ -333,9 +333,9 @@ class SearchTabs extends React.Component { Discos Canciones - - - + + + ) } @@ -350,6 +350,8 @@ export class Search extends React.Component { query: parsed.query, page: !isNaN(+parsed.page) ? +parsed.page : 1, }; + + console.log(this.state); } navigateToState = () => {