feat(SW-543): update contact config function

This commit is contained in:
Fredrik Thorsson
2025-01-02 11:29:09 +01:00
parent 584bcccb77
commit eab1386ee7
6 changed files with 16 additions and 15 deletions

View File

@@ -4,9 +4,12 @@ import type {
} from "@/server/routers/contentstack/base/output"
export function getValueFromContactConfig(
keyString: string,
data: ContactConfig
data: ContactConfig,
keyString?: string | null
): string | undefined {
if (!keyString) {
return undefined
}
const [groupName, key] = keyString.split(".") as [
ContactFieldGroups,
keyof ContactConfig[ContactFieldGroups],