refactor(LOY-62): implement code review feedback
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
import { RESTAURANT_REWARD_IDS, REWARD_IDS } from "@/constants/rewards"
|
||||
import {
|
||||
COUPON_REWARD_TYPES,
|
||||
RESTAURANT_REWARD_IDS,
|
||||
REWARD_IDS,
|
||||
} from "@/constants/rewards"
|
||||
|
||||
import type {
|
||||
CouponRewardType,
|
||||
RestaurantRewardId,
|
||||
RewardId,
|
||||
} from "@/types/components/myPages/rewards"
|
||||
@@ -40,3 +45,9 @@ export function isRestaurantOnSiteTierReward(
|
||||
): boolean {
|
||||
return isOnSiteTierReward(reward) && isRestaurantReward(reward.reward_id)
|
||||
}
|
||||
|
||||
export function isCouponRewardType(
|
||||
type: RewardWithRedeem["rewardType"]
|
||||
): type is CouponRewardType {
|
||||
return COUPON_REWARD_TYPES.some((t) => t === type)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user