Update paginated list component
@@ -46,7 +46,7 @@ export default class PaginatedList extends React.Component<Props, State> {
public render() {
let getContent = () => {
- if (this.props.count > 0) {
+ // if (this.props.count > 0) {
return (
<div className="paginated-list">
<div className="row">
@@ -56,13 +56,15 @@ export default class PaginatedList extends React.Component<Props, State> {
</div>
</div>
</div>
- <div className="row">
+ {this.props.count > 0 && <div className="row">
<div className="col-md-12">
<div className="list-items">
{this.props.componentList}
</div>
</div>
- </div>
+ </div>}
+ {!this.props.count &&
+ this.props.componentEmpty}
{paginate(this.props.count) &&
<div className="row">
<Pager>
@@ -83,9 +85,6 @@ export default class PaginatedList extends React.Component<Props, State> {
}
</div>
);
- } else {
- return this.props.componentEmpty;
- }
};
return getContent();
}
