refactor getVariantHeadline to getVariantField . The function should take in an additional prop to add the functionality to vary on variant field
eg
export const getVariantHeadline = (
test: Test | undefined,
variantId: VariantId,
field: string
) => {
return test?.variantMeta.find((variant) => variant.id === variantId)?.meta[field];
};
Ideally, the type of field would be limited to the fields available in the form UI.
refactor getVariantHeadline to getVariantField . The function should take in an additional prop to add the functionality to vary on variant field
eg
export const getVariantHeadline = (
test: Test | undefined,
variantId: VariantId,
field: string
) => {
return test?.variantMeta.find((variant) => variant.id === variantId)?.meta[field];
};
Ideally, the type of field would be limited to the fields available in the form UI.