Skip to content

Commit 6609af6

Browse files
committed
Update region pages
1 parent 3c3a643 commit 6609af6

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

plate-client/src/pages/region/RegionPages.tsx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff 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+
2039
export 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
))}

0 commit comments

Comments
 (0)