mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2026-01-29 19:14:19 +01:00
Enable gifting on christmas
This commit is contained in:
committed by
Paul Miller
parent
6d75e3b791
commit
b0e821bb7c
@@ -466,6 +466,7 @@ export default {
|
||||
gift: {
|
||||
give_sats_link: "Give sats as a gift",
|
||||
title: "Gifting",
|
||||
no_plus_caption: "Upgrade to Mutiny+ to enabled gifting",
|
||||
receive_too_small:
|
||||
"Your first receive needs to be {{amount}} SATS or greater.",
|
||||
setup_fee_lightning:
|
||||
|
||||
@@ -203,7 +203,11 @@ export default function GiftPage() {
|
||||
};
|
||||
|
||||
const selfHosted = state.settings?.selfhosted === "true";
|
||||
const canGift = state.mutiny_plus || selfHosted;
|
||||
const today = new Date();
|
||||
// days are 1 indexed, months are 0 indexed
|
||||
const isChristmas = today.getDate() === 25 && today.getMonth() === 11;
|
||||
|
||||
const canGift = state.mutiny_plus || selfHosted || isChristmas;
|
||||
|
||||
return (
|
||||
<MutinyWalletGuard>
|
||||
|
||||
@@ -73,6 +73,9 @@ export default function Settings() {
|
||||
const COMMIT_HASH = import.meta.env.__COMMIT_HASH__;
|
||||
|
||||
const selfHosted = state.settings?.selfhosted === "true";
|
||||
const today = new Date();
|
||||
// days are 1 indexed, months are 0 indexed
|
||||
const isChristmas = today.getDate() === 25 && today.getMonth() === 11;
|
||||
|
||||
return (
|
||||
<SafeArea>
|
||||
@@ -129,10 +132,18 @@ export default function Settings() {
|
||||
},
|
||||
{
|
||||
href: "/settings/gift",
|
||||
disabled: !(state.mutiny_plus || selfHosted),
|
||||
disabled: !(
|
||||
state.mutiny_plus ||
|
||||
selfHosted ||
|
||||
isChristmas
|
||||
),
|
||||
text: i18n.t("settings.gift.title"),
|
||||
caption: !(state.mutiny_plus || selfHosted)
|
||||
? "Upgrade to Mutiny+ to enabled gifting"
|
||||
caption: !(
|
||||
state.mutiny_plus ||
|
||||
selfHosted ||
|
||||
isChristmas
|
||||
)
|
||||
? i18n.t("settings.gift.no_plus_caption")
|
||||
: undefined
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user