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} />
|
||||
)
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import { AddNewCardDialog } from "./add-new-cart-dialog"
|
||||
import { DeleteCardDialog } from "./delete-card"
|
||||
import { useQuery } from "@tanstack/react-query"
|
||||
import { getUserCardsList } from "../../services/api/bank-card"
|
||||
import axios from "axios"
|
||||
|
||||
export const ManagementBankAccounts = () => {
|
||||
const [selectedCard, setSelectedCard] = useState<string | number | null>(null)
|
||||
@@ -21,8 +22,12 @@ export const ManagementBankAccounts = () => {
|
||||
const handleCloseDeleteDialog = () => setShowDeleteDialog(false)
|
||||
|
||||
useEffect(() => {
|
||||
console.log("data =>", data)
|
||||
}, [data])
|
||||
axios.get("https://asan-service.com/api/gps/bank-card", {
|
||||
headers: {
|
||||
Authorization: `Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2NGY0NDdlOWI2ZDM4YjJhYjc0NDIzNmQiLCJpYXQiOjE3MjM2MzIwMjIsImV4cCI6MTcyNjIyNDAyMn0.erPQMoiL2DN76CssBxlRukLe73T2o98JEB3m9bTnMY4`
|
||||
}
|
||||
}).then((res) => console.log("res>", res)).catch((err) => console.log(err))
|
||||
}, [])
|
||||
|
||||
if (isLoading) return <p>LOADING...</p>
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user