import { A5ListType } from '@/pages/A5introduce/data'

// 初始化状态
const initState = {
  // 列表数据
  info: {} as A5ListType
}

// 定义 action 类型
type Props = {
  type: 'A5/getInfo'
  payload: A5ListType
}

// reducer
export default function userReducer(state = initState, action: Props) {
  switch (action.type) {
    // 获取列表数据
    case 'A5/getInfo':
      return { ...state, info: action.payload }

    default:
      return state
  }
}
