Give tags their own column

This commit is contained in:
Tanner Collin 2022-01-28 08:22:51 +00:00
parent da510f2ab4
commit 52b9ab314e

View File

@ -87,6 +87,7 @@ export function Courses(props) {
<Table.Header> <Table.Header>
<Table.Row> <Table.Row>
<Table.HeaderCell>Name</Table.HeaderCell> <Table.HeaderCell>Name</Table.HeaderCell>
<Table.HeaderCell></Table.HeaderCell>
</Table.Row> </Table.Row>
</Table.Header> </Table.Header>
@ -96,13 +97,13 @@ export function Courses(props) {
<Table.Row key={x.id}> <Table.Row key={x.id}>
<Table.Cell> <Table.Cell>
<Link to={'/courses/'+x.id}>{x.name}</Link> <Link to={'/courses/'+x.id}>{x.name}</Link>
<span style={{ marginLeft: '2rem' }}> </Table.Cell>
<Table.Cell>
{!!x.tags && x.tags.split(',').map(name => {!!x.tags && x.tags.split(',').map(name =>
<Label color={tags[name]} tag> <Label color={tags[name]} tag>
{name} {name}
</Label> </Label>
)} )}
</span>
</Table.Cell> </Table.Cell>
</Table.Row> </Table.Row>
) )