/**
 * Created by nadiadaliavska on 7/1/17.
 */

import {PLUS_PAGE, MINUS_PAGE} from './actions'

const initialState = {
    pageNumber: 1
};

export const changePageNumber = (state = initialState, action) => {
    switch (action.type) {
        case PLUS_PAGE:
            return Object.assign({}, state, {
                pageNumber: state.pageNumber + 1
            });
        case MINUS_PAGE:
            return Object.assign({}, state, {
                pageNumber: state.pageNumber - 1
            });
        default :
            return state
    }
};
// export default changePageNumber;
@@ -383,32 +383,76 @@
 ase MINUS_PAGE:%0A
+            if (state.pageNumber %3E 1) %7B%0A    
             retu
@@ -473,32 +473,36 @@
 gn(%7B%7D, state, %7B%0A
+    
                 
@@ -538,36 +538,54 @@
 - 1%0A            
+  
+  
 %7D);%0A
+            %7D%0A
         default 

add checking to avoid page count < 1