feat: add blocks for loyalty page

This commit is contained in:
Christel Westerberg
2024-04-23 16:54:34 +02:00
parent fc0e5aed02
commit 2ddabf1e50
22 changed files with 418 additions and 109 deletions

17
utils/contactConfig.ts Normal file
View File

@@ -0,0 +1,17 @@
import {
ContactConfig,
ContactFieldGroups,
} from "@/types/requests/contactConfig"
export function getValueFromContactConfig(
keyStrings: string,
data: ContactConfig
): string | undefined {
const [groupName, key] = keyStrings.split(".") as [
ContactFieldGroups,
keyof ContactConfig[ContactFieldGroups],
]
const fieldGroup = data[groupName]
return fieldGroup[key]
}