sync bank card api and complete it

This commit is contained in:
Alihaghighattalab
2024-08-13 17:50:42 +03:30
parent 25b09cf7b1
commit 3bbf577093
20 changed files with 130 additions and 100 deletions
+6 -8
View File
@@ -2,19 +2,17 @@ import { useState } from "react"
import { Table } from "../common/table"
import { SortingState } from "@tanstack/react-table"
import { scoresCol } from "../../utility/score"
import { useQuery } from "@tanstack/react-query"
import { getScoreList } from "../../services/api/score"
export const Score = () => {
const [sorting, setSorting] = useState<SortingState>([])
const { data, isLoading } = useQuery({
queryKey: ["score-list"],
queryFn: getScoreList
})
// const { data, isLoading } = useQuery({
// queryKey: ["score-list"],
// queryFn: getScoreList
// })
if (isLoading) return <p>LOADING ...</p>
// if (isLoading) return <p>LOADING ...</p>
return (
<Table sorting={sorting} setSorting={setSorting} columns={scoresCol} data={data?.data} tableStatus={true} />
<Table sorting={sorting} setSorting={setSorting} columns={scoresCol} data={[]} tableStatus={true} />
)
}