complete award page - score - transactions not complete
This commit is contained in:
@@ -1,18 +1,24 @@
|
||||
import { useState } from "react"
|
||||
import { useEffect, 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 { getScoresList } 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: getScoresList
|
||||
})
|
||||
|
||||
// if (isLoading) return <p>LOADING ...</p>
|
||||
useEffect(() => {
|
||||
console.log("data =>", data)
|
||||
}, [data])
|
||||
|
||||
if (isLoading) return <p>LOADING ...</p>
|
||||
|
||||
return (
|
||||
<Table sorting={sorting} setSorting={setSorting} columns={scoresCol} data={[]} tableStatus={true} />
|
||||
<Table sorting={sorting} setSorting={setSorting} columns={scoresCol} data={data?.data} tableStatus={data?.score} />
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user