Fixing bug where videos were not fetched on a channel page.

This commit is contained in:
Roland 2022-01-04 09:26:21 -07:00
parent 51b7c1cc75
commit ea7fb09689
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93

View file

@ -252,6 +252,8 @@ class Videos extends React.Component {
await this.fetchChannel();
} else if (pageChanged) {
this.applyStateToHistory();
// TODO this causes a double search request. This will be fixed with a custom hook.
await this.fetchVideos();
}
}
@ -304,6 +306,7 @@ class Videos extends React.Component {
}
async fetchVideos() {
this.setState({videos: null});
let offset = this.state.limit * this.state.activePage - this.state.limit;
let channel_link = this.state.channel ? this.state.channel.link : null;
let {queryStr, searchOrder, limit} = this.state;