Skip to content

Commit

Permalink
Use the TAG_COLOURS constant instead of strings
Browse files Browse the repository at this point in the history
  • Loading branch information
DeanElliott96 committed Dec 20, 2024
1 parent a67c4c6 commit 56a1bca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/client/modules/Events/transformers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import urls from '../../../lib/urls'

import { getDifferenceInDays, formatStartAndEndDate } from '../../utils/date'

import { TAG_COLOURS } from '../../components/Tag'
import {
formatDate,
DATE_FORMAT_FULL,
Expand Down Expand Up @@ -32,23 +33,23 @@ const transformEventToListItem = ({
if (event_type) {
tags.push({
text: event_type.name,
colour: 'grey',
colour: TAG_COLOURS.GREY,
dataTest: 'event-kind-label',
})
}

if (service) {
tags.push({
text: getServiceText(service.name),
colour: 'govBlue',
colour: TAG_COLOURS.GOV_BLUE,
dataTest: 'event-theme-label',
})
}

if (service && service2) {
tags.push({
text: getServiceOtherText(service2),
colour: 'blue',
colour: TAG_COLOURS.BLUE,
dataTest: 'event-service-label',
})
}
Expand Down

0 comments on commit 56a1bca

Please sign in to comment.