
import React from 'react'
import DashBody from '../../Layout/Dashboard/DashBody'
import DashHeader from '../../Layout/Dashboard/DashHeader'
import LyTable from '../../Layout/Dashboard/LyTable'
import useTableColumns from './useTableColumns'
import { useGetRecentWorks} from '../../api/RecentWorks'
import { QueryStatusEnum } from '../../config/QueryStatus'
import EditRecentWorksModal from './EditRecentWorksModal'
import AddRecentWorksModal from './AddRecentWorksModal'

function RecentWorksPage() {

    const column   =useTableColumns()
    const {data  ,status } = useGetRecentWorks()

    
  return (
    // Pass Status to Layout 
    <DashBody status={status as QueryStatusEnum} >
      <DashHeader title={'RecentWorks'}></DashHeader>
      
      <LyTable
        data={data}
        isLoading={false}
        columns={column}
      />
      
      <EditRecentWorksModal />
      <AddRecentWorksModal />
      
    </DashBody>
  )
}

export default RecentWorksPage

