push for fix bug!
This commit is contained in:
@@ -2,16 +2,18 @@ import { installationReportsCol } from "../../utility/reports"
|
||||
import { Table } from "../common/table"
|
||||
import { useState } from "react"
|
||||
import { SortingState } from "@tanstack/react-table"
|
||||
import { useQuery } from "@tanstack/react-query"
|
||||
import { getRegisterDeviceList } from "../../services/api/register-device"
|
||||
|
||||
export const InstallationReports = () => {
|
||||
const [sorting, setSorting] = useState<SortingState>([])
|
||||
// const { data, isLoading } = useQuery({
|
||||
// queryKey: ["installation-reports-list"],
|
||||
// queryFn: getReportsList
|
||||
// })
|
||||
const { data, isLoading } = useQuery({
|
||||
queryKey: ["register-device"],
|
||||
queryFn: getRegisterDeviceList
|
||||
})
|
||||
|
||||
// if (isLoading) return <p>LODING .....</p>
|
||||
if (isLoading) return <p>LODING .....</p>
|
||||
return (
|
||||
<Table columns={installationReportsCol} data={[]} sorting={sorting} setSorting={setSorting} />
|
||||
<Table columns={installationReportsCol} data={data?.data} sorting={sorting} setSorting={setSorting} />
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user