Skip to content

Commit

Permalink
Use longer pefix
Browse files Browse the repository at this point in the history
  • Loading branch information
anotherminh committed Aug 10, 2023
1 parent b08fa28 commit 735fb8f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hooks/useGetPurposeMessageKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { useMemo } from 'preact/hooks';

import { DefinedMessage } from '@transcend-io/internationalization';

const CUSTOM_PURPOSE_MESSAGE_PREFIX = 'cm-ui.purpose'

export interface PurposeMessages {
/** The lookup of purpose trackingTypes to message key */
purposeToMessageKey: Record<string, DefinedMessage>;
Expand All @@ -25,7 +27,7 @@ export const useGetPurposeMessageKeys = ({ consentSelection, defaultPurposeToMes
if (allMessages[purposeType]) {
return allMessages;
}
const customPurposeMessageLabel = `purpose.${purposeType}`;
const customPurposeMessageLabel = `${CUSTOM_PURPOSE_MESSAGE_PREFIX}.${purposeType}`;
return {
...allMessages,
[purposeType]: {
Expand Down

0 comments on commit 735fb8f

Please sign in to comment.