123456789101112131415161718192021222324252627 |
- import { ADD, MINUS } from '../constants/user'
-
- // landlord: 'landlord',
- // customer:'customer'
-
- const INITIAL_STATE = {
- link:'index',
- id:String,
- params:Object
- }
-
- export default function counter (state = INITIAL_STATE, action) {
- switch (action.type) {
- case ADD:
- return {
- ...state,
- num: state.num + 1
- }
- case MINUS:
- return {
- ...state,
- num: state.num - 1
- }
- default:
- return state
- }
- }
|