summaryrefslogtreecommitdiffstats
path: root/frontend/enhancers
diff options
context:
space:
mode:
authorWes Bos <wesbos@gmail.com>2018-03-12 14:06:25 -0400
committerWes Bos <wesbos@gmail.com>2018-03-12 14:06:25 -0400
commit46a0ba30ef54a7e36206481a4f5b2bf1f9702fca (patch)
treea95fd534fc27761d8b26d0dffcdb5f300f7a61c7 /frontend/enhancers
parentf7bea2d1b7be2b70dceb25c9837f608b538e9cec (diff)
wip
Diffstat (limited to 'frontend/enhancers')
-rw-r--r--frontend/enhancers/enhancers.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/frontend/enhancers/enhancers.js b/frontend/enhancers/enhancers.js
index ded59b9..b96a747 100644
--- a/frontend/enhancers/enhancers.js
+++ b/frontend/enhancers/enhancers.js
@@ -9,14 +9,17 @@ import {
UPDATE_UI,
GET_UI_STATE,
TOGGLE_CART,
+ UPDATE_USER_MUTATION,
} from '../queries/index';
+import { perPage } from '../config';
export const itemEnhancer = graphql(ALL_ITEMS_QUERY, {
name: 'itemsQuery',
options({ page }) {
return {
variables: {
- skip: page * 3 - 3,
+ skip: page * perPage - perPage,
+ first: perPage,
},
};
},
@@ -80,6 +83,10 @@ export const userEnhancer = graphql(CURRENT_USER_QUERY, { name: 'currentUser' })
export const uiEnhancer = graphql(GET_UI_STATE, { name: 'ui' });
+export const updateUserEnhancer = graphql(UPDATE_USER_MUTATION, {
+ name: 'updateUser',
+});
+
export const updateUIEnhancer = graphql(UPDATE_UI, {
props: data => ({
updateNetworkStatus: isConnected =>