Skip to content

Commit

Permalink
fix(pages/search): hide pagination if only one page of results
Browse files Browse the repository at this point in the history
  • Loading branch information
HipsterBrown authored and znarf committed May 19, 2018
1 parent 4ba3e57 commit c29881c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class SearchPage extends React.Component {
<p className="center"><em>No collectives found matching your query: &quot;{term}&quot;</em></p>
)}
</Row>
{showCollectives && collectives.length !== 0 && <Row>
{showCollectives && collectives.length !== 0 && total > limit && <Row>
<ul className="pagination">
{ Array(Math.ceil(total / limit)).fill(1).map((n, i) => (
<li key={i * limit} className={classNames({ active: (i * limit) === offset })}>
Expand Down

0 comments on commit c29881c

Please sign in to comment.