feat(LOY-365): Add support for eligible levels for promo campaign pages * feat(LOY-365): Add support for eligible levels for promo campaign pages * fix(LOY-365): update to most recent copy * fix(LOY-365): cleanup css * fix(LOY-365): Move ineligible message to the bottom * fix(LOY-365): remove uneeded type Approved-by: Erik Tiekstra Approved-by: Matilda Landström
11 lines
423 B
TypeScript
11 lines
423 B
TypeScript
import { MembershipLevelEnum } from "../constants/membershipLevels"
|
|
|
|
/**
|
|
* Type guard to check if a string value is a valid MembershipLevel
|
|
* @param value - The string value to check
|
|
* @returns true if the value is a valid MembershipLevel, false otherwise
|
|
*/
|
|
export function isMembershipLevel(value: string): value is MembershipLevelEnum {
|
|
return Object.values(MembershipLevelEnum).some((level) => level === value)
|
|
}
|