File size: 1,116 Bytes
f0743f4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import type { ColumnDef } from '@tanstack/react-table';

export type Spec = {
  name: string;
  method: string;
  path: string;
  domain: string;
};

export const fakeData: Spec[] = [
  {
    name: 'listPets',
    method: 'get',
    path: '/pets',
    domain: 'petstore.swagger.io',
  },
  {
    name: 'createPets',
    method: 'post',
    path: '/pets',
    domain: 'petstore.swagger.io',
  },
  {
    name: 'showPetById',
    method: 'get',
    path: '/pets/{petId}',
    domain: 'petstore.swagger.io',
  },
];

export const columns: ColumnDef<Spec>[] = [
  {
    header: 'Name',
    accessorKey: 'name',
  },
  {
    header: 'Method',
    accessorKey: 'method',
  },
  {
    header: 'Path',
    accessorKey: 'path',
  },
  // {
  //   header: '',
  //   accessorKey: 'action',
  //   // eslint-disable-next-line @typescript-eslint/no-unused-vars
  //   cell: ({ row: _row }) => (
  //     <button className="btn relative btn-neutral h-8 rounded-lg border-token-border-light font-medium">
  //       <div className="flex w-full gap-2 items-center justify-center">Test</div>
  //     </button>
  //   ),
  // },
];