-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathOrganizations.tsx
47 lines (43 loc) · 1.38 KB
/
Organizations.tsx
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
import Button from 'react-bootstrap/Button'
import Table from 'react-bootstrap/Table'
import type { FindOrganizations } from 'types/graphql'
import { Link, routes } from '@redwoodjs/router'
import { truncate } from 'src/lib/formatters'
const OrganizationsList = ({ organizations }: FindOrganizations) => {
return (
<Table striped borderless>
<thead>
<tr>
<th className={'border'}>Id</th>
<th className={'border'}>Name</th>
<th className="border">Actions</th>
</tr>
</thead>
<tbody>
{organizations.map((organization) => (
<tr key={organization.id}>
<td className="border border-slate-700">
{truncate(organization.id)}
</td>
<td className="border border-slate-700">
{truncate(organization.name)}
</td>
<td className="border border-slate-700">
<nav className="rw-table-actions">
<Link
to={routes.editOrganization({ id: organization.id })}
title={'Edit organization ' + organization.id}
>
<Button size="sm" variant="secondary">
Edit
</Button>
</Link>
</nav>
</td>
</tr>
))}
</tbody>
</Table>
)
}
export default OrganizationsList