Merge pull request #1665 from lbryio/btzr-patch

Fix incorrect page designation
This commit is contained in:
Sean Yesmunt 2018-06-21 14:33:16 -04:00 committed by GitHub
commit 0cd188014c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 14 deletions

View file

@ -57,7 +57,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
* Incorrect markdown preview on url with parentheses ([#1570](https://github.com/lbryio/lbry-app/issues/1570))
* Fix Linux upgrade path and add manual installation note ([#1606](https://github.com/lbryio/lbry-app/issues/1606))
* Fix can type in unfocused fields while publishing without selecting file ([#1456](https://github.com/lbryio/lbry-app/issues/1456))
* Fix navigation button resulting incorrect page designation ([#1502](https://github.com/lbryio/lbry-app/issues/1502))
## [0.21.6] - 2018-06-05

View file

@ -66,7 +66,7 @@ class ChannelPage extends React.PureComponent<Props> {
render() {
const { fetching, claimsInChannel, claim, page, totalPages } = this.props;
const { name, permanent_url: permanentUrl, claim_id: claimId } = claim;
const currentPage = parseInt((page || 1) - 1, 10);
let contentList;
if (fetching) {
contentList = <BusyIndicator message={__('Fetching content')} />;
@ -104,7 +104,8 @@ class ChannelPage extends React.PureComponent<Props> {
breakClassName="pagination__item pagination__item--break"
marginPagesDisplayed={2}
onPageChange={e => this.changePage(e.selected + 1)}
initialPage={parseInt(page - 1, 10)}
forcePage={currentPage}
initialPage={currentPage}
containerClassName="pagination"
/>

View file

@ -9,12 +9,12 @@
line-height: $spacing-vertical * 1.5;
height: $spacing-vertical * 1.5;
border-radius: 2px;
&:not(.pagination__item--selected):hover {
&:not(.pagination__item--selected):not(.pagination__item--break):not(.disabled):hover {
background: rgba(0, 0, 0, 0.2);
> a {
cursor: hand;
}
cursor: pointer;
}
> a {
display: inline-block;
padding: 0 $spacing-vertical * 2 / 3;