summaryrefslogtreecommitdiffstats
path: root/frontend/enhancers
diff options
context:
space:
mode:
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 =>