do not show seperator if there are no other pages between button before and after seperator

This commit is contained in:
Maren Süwer
2018-08-02 11:46:51 +02:00
parent 1975beff40
commit 0816fc3229

View File

@@ -93,8 +93,9 @@ class Paginator extends React.Component<Props> {
if (page + 1 < pageTotal) {
links.push(this.renderPageButton(page + 1, "next"));
links.push(this.seperator());
}
if(page+2 < pageTotal) //if there exists pages between next and last
links.push(this.seperator());
if (page < pageTotal) {
links.push(this.renderLastButton());
}