
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 { useGetProjects} from '../../api/projects'
import { QueryStatusEnum } from '../../config/QueryStatus'
import EditProjectsModal from './EditProjectsModal'
import AddProjectsModal from './AddProjectsModal'

function ProjectsPage() {

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

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

export default ProjectsPage

