소스 검색

feat: Happy New Year

CaIon 2 년 전
부모
커밋
d6d91e4340
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      web/src/components/HeaderBar.js

+ 2 - 1
web/src/components/HeaderBar.js

@@ -43,7 +43,8 @@ const HeaderBar = () => {
     const logo = getLogo();
     var themeMode = localStorage.getItem('theme-mode');
     const currentDate = new Date();
-    const isNewYear = currentDate.getMonth() === 0 && currentDate.getDate() === 1;
+    // enable fireworks on new year(1.1 and 2.9-2.24)
+    const isNewYear = (currentDate.getMonth() === 0 && currentDate.getDate() === 1) || (currentDate.getMonth() === 1 && currentDate.getDate() >= 9 && currentDate.getDate() <= 24);
 
     async function logout() {
         setShowSidebar(false);