File tree Expand file tree Collapse file tree
plate-client/src/pages/region Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,31 +17,31 @@ import {
1717 getCoreRowModel ,
1818} from '@tanstack/react-table' ;
1919
20+ const columns : ColumnDef < RegionList > [ ] = [
21+ {
22+ header : 'No.' ,
23+ cell : ( { row } ) => row . index + 1 ,
24+ } ,
25+ {
26+ accessorKey : 'regionArea' ,
27+ header : 'Daerah' ,
28+ } ,
29+ {
30+ accessorKey : 'regionCode' ,
31+ header : 'Kode Plat' ,
32+ } ,
33+ {
34+ accessorKey : 'regionNote' ,
35+ header : 'Keterangan' ,
36+ } ,
37+ ] ;
38+
2039export default function Region ( ) {
2140 const { data, isLoading } = useQuery ( {
2241 queryKey : [ 'list-region' ] ,
2342 queryFn : async ( ) => listRegionPlate ( ) ,
2443 } ) ;
2544
26- const columns : ColumnDef < RegionList > [ ] = [
27- {
28- header : 'No.' ,
29- cell : ( { row } ) => row . index + 1 ,
30- } ,
31- {
32- accessorKey : 'regionArea' ,
33- header : 'Daerah' ,
34- } ,
35- {
36- accessorKey : 'regionCode' ,
37- header : 'Kode Plat' ,
38- } ,
39- {
40- accessorKey : 'regionNote' ,
41- header : 'Keterangan' ,
42- } ,
43- ] ;
44-
4545 const table = useReactTable ( {
4646 data : data ?? [ ] ,
4747 columns,
@@ -61,7 +61,7 @@ export default function Region() {
6161 ? null
6262 : flexRender (
6363 header . column . columnDef . header ,
64- header . getContext ( )
64+ header . getContext ( ) ,
6565 ) }
6666 </ TableHead >
6767 ) ) }
You can’t perform that action at this time.
0 commit comments