mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
moved check from calling component to paginator
This commit is contained in:
@@ -123,21 +123,25 @@ class LinkPaginator extends React.Component<Props> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { t } = this.props;
|
const { collection, t } = this.props;
|
||||||
return (
|
|
||||||
<nav className="pagination is-centered" aria-label="pagination">
|
if(collection) {
|
||||||
{this.renderPreviousButton(
|
return (
|
||||||
"pagination-previous",
|
<nav className="pagination is-centered" aria-label="pagination">
|
||||||
t("paginator.previous")
|
{this.renderPreviousButton(
|
||||||
)}
|
"pagination-previous",
|
||||||
<ul className="pagination-list">
|
t("paginator.previous")
|
||||||
{this.pageLinks().map((link, index) => {
|
)}
|
||||||
return <li key={index}>{link}</li>;
|
<ul className="pagination-list">
|
||||||
})}
|
{this.pageLinks().map((link, index) => {
|
||||||
</ul>
|
return <li key={index}>{link}</li>;
|
||||||
{this.renderNextButton("pagination-next", t("paginator.next"))}
|
})}
|
||||||
</nav>
|
</ul>
|
||||||
);
|
{this.renderNextButton("pagination-next", t("paginator.next"))}
|
||||||
|
</nav>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user