From 9b6abe374aecb95902913c93e18ce40680a00b4e Mon Sep 17 00:00:00 2001 From: 4444dogs <85034387+4444dogs@users.noreply.github.com> Date: Tue, 20 Sep 2022 11:26:20 -0600 Subject: [PATCH] feat: add seasonal halloween theme (#784) Co-authored-by: Sophie L --- src/pages/home/Home.tsx | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/src/pages/home/Home.tsx b/src/pages/home/Home.tsx index 75609150..f6c82ba1 100644 --- a/src/pages/home/Home.tsx +++ b/src/pages/home/Home.tsx @@ -51,21 +51,37 @@ export default observer(() => { state.settings.set("appearance:seasonal", !seasonalTheme); const isDecember = !isTouchscreenDevice && new Date().getMonth() === 11; + const isOctober = !isTouchscreenDevice && new Date().getMonth() === 9 const snowflakes = useMemo(() => { const flakes = []; - // Disable outside of December - if (!isDecember) return []; + if (isDecember) { + for (let i = 0; i < 15; i++) { + flakes.push("❄️"); + flakes.push("❄"); + } - for (let i = 0; i < 15; i++) { - flakes.push("❄️"); - flakes.push("❄"); + for (let i = 0; i < 2; i++) { + flakes.push("🎄"); + flakes.push("☃️"); + flakes.push("⛄"); + } + + return flakes; } + if (isOctober) { + for (let i = 0; i < 15; i++) { + flakes.push("🎃"); + flakes.push("💀"); + } - for (let i = 0; i < 2; i++) { - flakes.push("🎄"); - flakes.push("☃️"); - flakes.push("⛄"); + for (let i = 0; i < 2; i++) { + flakes.push("👻"); + flakes.push("⚰️"); + flakes.push("🕷️"); + } + + return flakes; } return flakes;