Skip to content

Refactor getVariantHeadline to getVariantField to make it scalable #29048

Description

@abeddow91

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions