+
{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 = () => {