Skip to content

Commit

Permalink
choose titles over labels
Browse files Browse the repository at this point in the history
  • Loading branch information
kate-kazantseva committed Oct 30, 2024
1 parent 437f431 commit 9ca522a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/transcend-io/consent-manager-ui.git"
},
"homepage": "https://github.com/transcend-io/consent-manager-ui",
"version": "4.22.2",
"version": "4.22.3",
"license": "MIT",
"main": "build/ui",
"files": [
Expand Down
7 changes: 2 additions & 5 deletions src/hooks/useGetPurposeMessageKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@ export const useGetPurposeMessageKeys = ({
// the purpose type is unique for the bundle
[...Object.keys(consentSelection ?? {}), 'Essential'].reduce(
(allMessages, purposeType) => {
if (allMessages[purposeType]) {
return allMessages;
}
const purposeMessageLabel = `${PURPOSE_MESSAGE_PREFIX}.${purposeType}.title`;
const purposeMessageTitleId = `${PURPOSE_MESSAGE_PREFIX}.${purposeType}.title`;
return {
...allMessages,
[purposeType]: {
id: purposeMessageLabel,
id: purposeMessageTitleId,
defaultMessage: purposeType,
description: `Translatable name for purpose '${purposeType}'`,
} as DefinedMessage,
Expand Down

0 comments on commit 9ca522a

Please sign in to comment.