refactor(LOY-62): revert to switch case for ScriptedRewardText label text
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import {
|
||||
COUPON_REWARD_TYPES,
|
||||
RESTAURANT_REWARD_IDS,
|
||||
REWARD_IDS,
|
||||
REWARD_TYPES,
|
||||
} from "@/constants/rewards"
|
||||
|
||||
import type {
|
||||
CouponRewardType,
|
||||
RestaurantRewardId,
|
||||
RewardId,
|
||||
RewardType,
|
||||
} from "@/types/components/myPages/rewards"
|
||||
import type { RewardWithRedeem } from "@/server/routers/contentstack/reward/output"
|
||||
|
||||
@@ -46,8 +46,6 @@ export function isRestaurantOnSiteTierReward(
|
||||
return isOnSiteTierReward(reward) && isRestaurantReward(reward.reward_id)
|
||||
}
|
||||
|
||||
export function isCouponRewardType(
|
||||
type: RewardWithRedeem["rewardType"]
|
||||
): type is CouponRewardType {
|
||||
return COUPON_REWARD_TYPES.some((t) => t === type)
|
||||
export function getRewardType(type?: string): RewardType | null {
|
||||
return REWARD_TYPES.find((t) => t === type) ?? null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user