diff --git a/src/components/Checkout/DonationNudge/DonationNudgeLightbox.vue b/src/components/Checkout/DonationNudge/DonationNudgeLightbox.vue index b348d90e7b..16109007ab 100644 --- a/src/components/Checkout/DonationNudge/DonationNudgeLightbox.vue +++ b/src/components/Checkout/DonationNudge/DonationNudgeLightbox.vue @@ -99,6 +99,7 @@ import HeartIcon from '@/assets/icons/inline/heart-icon.svg'; import HowKivaUsesDonation from '@/components/Checkout/HowKivaUsesDonation'; import { gql } from '@apollo/client'; import { readBoolSetting } from '@/util/settingsUtils'; +import { add } from 'date-fns'; import KvButton from '~/@kiva/kv-components/vue/KvButton'; import KvLightbox from '~/@kiva/kv-components/vue/KvLightbox'; import KvMaterialIcon from '~/@kiva/kv-components/vue/KvMaterialIcon'; @@ -188,8 +189,7 @@ export default { setDonationAndClose(amount, source) { const zeroUpsellCookie = this.cookieStore.get('zero_upsell_visible') || true; if (amount === 0) { - const expires = new Date(); - expires.setTime(expires.getTime() + (24 * 60 * 60 * 1000)); + const expires = add(new Date(), { days: 1 }); this.cookieStore.set('zero_upsell_visible', false, { expires }); this.$kvTrackEvent('basket', 'click', `Update Nudge Donation - ${source}`, amount * 100); }