Blame view

src/reducers/productDetail.js 339 Bytes
王水玲 authored
1 2 3 4 5 6
import { SHOWSIZEBOX } from '../constants/productDetail'

const INITIAL_STATE = {
  showSizeBox: false
}
王水玲 authored
7
export default function productDetail (state = INITIAL_STATE, action) {
王水玲 authored
8 9 10 11 12 13 14 15 16 17
  switch (action.type) {
    case SHOWSIZEBOX:
      return {
        ...state,
        showSizeBox: action.isShow
      }
    default:
       return state
  }
}