mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
let christmas theme run until jan 5th
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user