Skip to content

Commit

Permalink
Merge pull request #985 from daniel-ac-martin/department-mapping
Browse files Browse the repository at this point in the history
Header: Improve department mapping
  • Loading branch information
daniel-ac-martin authored May 31, 2024
2 parents 9d8b596 + 89de757 commit f38755d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/header/src/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const departmentMap = {
'department-for-culture-media-sport': 'DCMS',
'department-for-environment-food-rural-affairs': 'DEFRA',
'department-for-work-pensions': 'DWP',
'foreign-commonwealth-development-office': 'FCDO',
'foreign-commonwealth-office': 'FCO',
'hm-revenue-customs': 'HMRC',
'hm-treasury': 'HM Treasury',
Expand All @@ -63,8 +64,12 @@ const departmentText = (d: string) => (
.split('-')
.map(e => {
switch (e) {
case 'and':
return '';
case 'hm':
return 'HM';
case 'for':
return '';
case 'of':
return 'o';
case 'the':
Expand Down

1 comment on commit f38755d

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Published on https://not-gov.uk as production
🚀 Deployed on https://6659f9bd0761dd6469b9b1db--notgovuk.netlify.app

Please sign in to comment.