From 8ccb0d93cdc064776454c929e15aa03129be37a3 Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Fri, 11 May 2018 10:46:24 -0400 Subject: clean up --- frontend/components/Cart.js | 10 +++++++--- frontend/components/CreateItem.js | 8 +------- frontend/components/Items.js | 9 +-------- frontend/components/Pagination.js | 2 ++ frontend/components/TakeMyMoney.js | 2 +- 5 files changed, 12 insertions(+), 19 deletions(-) (limited to 'frontend/components') diff --git a/frontend/components/Cart.js b/frontend/components/Cart.js index dbc3e9e..5d68102 100644 --- a/frontend/components/Cart.js +++ b/frontend/components/Cart.js @@ -13,9 +13,13 @@ import CloseButton from './styles/CloseButton'; import SickButton from './styles/SickButton'; const Composed = adopt({ - toggleCart: , - localState: , - currentUser: , + toggleCart: {() => {}}, + localState: {() => {}}, + currentUser: ( + + {() => {}} + + ), }); const Cart = () => ( diff --git a/frontend/components/CreateItem.js b/frontend/components/CreateItem.js index b40932c..0e26330 100644 --- a/frontend/components/CreateItem.js +++ b/frontend/components/CreateItem.js @@ -41,15 +41,9 @@ class CreateItem extends Component { }); }; - // TODO: Problem here - if I refetch page 1, page 2 to infinity are still out of date. I need to refetch all the pages somehow? Or use @connection render() { return ( - + {(createItem, { loading, error }) => (
@@ -41,7 +34,7 @@ class ItemList extends React.Component { skip: this.props.page * perPage - perPage, first: perPage, }} - fetchPolicy={fetchPolicy} + // fetchPolicy="network-only" > {({ data, error, loading }) => { if (loading) { diff --git a/frontend/components/Pagination.js b/frontend/components/Pagination.js index 1432746..cb43a10 100644 --- a/frontend/components/Pagination.js +++ b/frontend/components/Pagination.js @@ -41,6 +41,7 @@ const Pagination = props => ( return ( ( {aggregate.count} Items Total