import React from 'react'
import styles from './index.module.scss'
import { baseFormData, topSearch } from '@/pages/Zother/data'
import { useSelector } from 'react-redux'
import { RootState } from '@/store'
import TableList from '@/pages/Zother/TableList'
import { B4_APIgetList } from '@/store/action/Benter/B4enterCang'
import { baseTableC } from '@/utils/tableData'

const search = topSearch('入藏')

const baseFormDataRes = baseFormData()

function B4enterCang() {
  // 从仓库拿数据
  const tableInfo = useSelector((state: RootState) => state.B4enterCang.tableInfo)

  return (
    <div className={styles.B4enterCang}>
      <div className='pageTitle'>藏品入藏</div>

      <TableList
        baseFormData={baseFormDataRes}
        getListAPI={B4_APIgetList}
        pageKey='enterCang'
        tableInfo={tableInfo}
        columnsTemp={baseTableC('入藏')}
        yHeight={585}
        searchDom={search}
      />
    </div>
  )
}

const MemoB4enterCang = React.memo(B4enterCang)

export default MemoB4enterCang
