fix(LOY-61): only invalidate current rewards if reward is redeemed or confirm close redeemed reward
This commit is contained in:
@@ -90,9 +90,14 @@ export default function Redeem({ reward, membershipNumber }: RedeemProps) {
|
|||||||
<Dialog className={styles.dialog} aria-label={reward.label}>
|
<Dialog className={styles.dialog} aria-label={reward.label}>
|
||||||
{({ close }) => {
|
{({ close }) => {
|
||||||
function closeModal() {
|
function closeModal() {
|
||||||
utils.contentstack.rewards.current.invalidate({
|
if (
|
||||||
lang,
|
redeemStep === "redeemed" ||
|
||||||
})
|
redeemStep === "confirm-close"
|
||||||
|
) {
|
||||||
|
utils.contentstack.rewards.current.invalidate({
|
||||||
|
lang,
|
||||||
|
})
|
||||||
|
}
|
||||||
close()
|
close()
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user