import { A3TableType } from "@/types";

// 初始化状态
const initState = {
  // 表格数据
  tableInfo: [] as A3TableType[],
};

// 定义 action 类型
type Props = { type: "A3/getList"; payload: A3TableType[] };

// 频道 reducer
export default function A1Reducer(state = initState, action: Props) {
  switch (action.type) {
    // 获取列表数据
    case "A3/getList":
      return { ...state, tableInfo: action.payload };

    default:
      return state;
  }
}
