Skip to content

Commit 0b86ce3

Browse files
committed
Add tags to event
1 parent db9f22a commit 0b86ce3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/components/event/Event.jsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { formatDate, formatTime } from '../utils/dateHandler.jsx'
1515
const Event = ({ event, onLike }) => {
1616
const t = useTranslate('Conticki')
1717
// Unwrap the event object.
18-
const { title, image, description, ticket, themes, location } = event
18+
const { title, image, description, ticket, themes, location, tags } = event
1919

2020
return (
2121
<div className='event'>
@@ -35,6 +35,13 @@ const Event = ({ event, onLike }) => {
3535
{themes.map(theme => <Link key={theme.id} to={`/theme/${theme.id}`}>{theme.title}</Link>)}
3636
</p>}
3737
</Col>
38+
<Col>
39+
{tags && tags.length > 0 &&
40+
<p className='lead mb-0'>
41+
<strong className='mr-3'>{t('Tags', { n: tags.length })}</strong>
42+
{tags.map(tag => <span key={tag.id} to={`/theme/${tag.id}`} className='mr-3'>{tag.title}</span>)}
43+
</p>}
44+
</Col>
3845
</Row>
3946
{ticket && ticket.url &&
4047
<Row>

0 commit comments

Comments
 (0)