From ad3671675719eb11a81245bffbe0fb18880b479b Mon Sep 17 00:00:00 2001
From: Wes Bos
Date: Tue, 8 May 2018 13:00:51 -0400
Subject: omg
---
frontend/components/Pagination.js | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
(limited to 'frontend/components/Pagination.js')
diff --git a/frontend/components/Pagination.js b/frontend/components/Pagination.js
index 39de901..1432746 100644
--- a/frontend/components/Pagination.js
+++ b/frontend/components/Pagination.js
@@ -33,15 +33,14 @@ const PaginationStyles = styled.div`
const Pagination = props => (
{({ data, loading, error }) => {
- console.log(error);
- if (loading) return null;
+ if (loading || error) return null;
const { aggregate } = data.itemsConnection;
const { page } = props;
const pages = Math.ceil(aggregate.count / perPage);
+ // TODO prefetch this
return (
-
+
(
{aggregate.count} Items Total