let christmas theme run until jan 5th

This commit is contained in:
Tom (plebeius.eth)
2024-12-24 17:44:43 +01:00
parent 8accaac343
commit f533faf9f6
3 changed files with 3 additions and 3 deletions
@@ -74,7 +74,7 @@ const Style = () => {
const today = new Date();
const month = today.getMonth();
const day = today.getDate();
const isChristmas = month === 11 && (day === 24 || day === 25);
const isChristmas = (month === 11 && day >= 24) || (month === 0 && day <= 5);
const handleThemeChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
const newTheme = e.target.value;
+1 -1
View File
@@ -42,7 +42,7 @@ const useTheme = (): [string, (theme: string) => void] => {
const today = new Date();
const month = today.getMonth();
const day = today.getDate();
const isChristmas = month === 11 && (day === 24 || day === 25);
const isChristmas = (month === 11 && day >= 24) || (month === 0 && day <= 5);
const subplebbitAddress = params?.subplebbitAddress || pendingPostSubplebbitAddress;
if (isChristmas && isEnabled === null && subplebbitAddress && !isInAllView && !isInSubscriptionsView) {
+1 -1
View File
@@ -102,5 +102,5 @@ export const shouldShowSnow = (): boolean => {
const today = new Date();
const month = today.getMonth();
const day = today.getDate();
return month === 11 && (day === 24 || day === 25);
return (month === 11 && day >= 24) || (month === 0 && day <= 5);
};