📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
added snow
Blue Mousef04e62d27cb6
diff --git a/package.json b/package.jsonindex 9991e867e..4e3104143 100644--- a/package.json+++ b/package.json@@ -37,6 +37,7 @@"react-router-dom": "^5.3.4","react-router-hash-link": "^2.4.3","react-scripts": "5.0.1",+ "react-snowfall": "^1.2.1","react-timezone-select": "^1.3.2","redux": "^4.2.0","redux-saga": "^1.2.1",diff --git a/src/App.js b/src/App.jsindex 2e2f11528..812442961 100644--- a/src/App.js+++ b/src/App.js@@ -2,9 +2,9 @@ import React, {useEffect, lazy, Suspense, useState,} from 'react'import { Switch, Route, useLocation } from 'react-router-dom'-import routes from 'routes'import { useDispatch, useSelector } from 'react-redux'import { useAlert } from '@blaumaus/react-alert'+import Snowfall from 'react-snowfall'import cx from 'clsx'import _some from 'lodash/some'import _includes from 'lodash/includes'@@ -17,12 +17,13 @@ import Loader from 'ui/Loader'import ScrollToTop from 'hoc/ScrollToTop'import Selfhosted from 'hoc/Selfhosted'-import { isSelfhosted } from 'redux/constants'+import { isSelfhosted, THEME_TYPE } from 'redux/constants'import { getAccessToken } from 'utils/accessToken'import { authActions } from 'redux/actions/auth'import { errorsActions } from 'redux/actions/errors'import { alertsActions } from 'redux/actions/alerts'import UIActions from 'redux/actions/ui'+import routes from 'routes'import { authMe } from './api'const MainPage = lazy(() => import('pages/MainPage'))@@ -160,6 +161,12 @@ const App = () => {// eslint-disable-next-line react/jsx-no-useless-fragment<Suspense fallback={<></>}><Header authenticated={authenticated} theme={theme} themeType={themeType} />+ {location.pathname === routes.main && (+ <Snowfall />+ )}+ {location.pathname !== routes.main && themeType === THEME_TYPE.christmas && (+ <Snowfall snowflakeCount={10} />+ )}<ScrollToTop><Selfhosted><Suspense fallback={<Fallback theme={theme} isMinimalFooter={isMinimalFooter} />}>diff --git a/src/pages/MainPage/index.jsx b/src/pages/MainPage/index.jsxindex ff431076c..931a9c7e1 100644--- a/src/pages/MainPage/index.jsx+++ b/src/pages/MainPage/index.jsx@@ -49,7 +49,7 @@ const Main = () => {return (<Title title={t('titles.main')}>- <div className='relative flex justify-center items-center bg-gray-900 py-2 px-2'>+ <div className='flex justify-center items-center bg-gray-900 py-2 px-2'><a href='https://bank.gov.ua/en/news/all/natsionalniy-bank-vidkriv-spetsrahunok-dlya-zboru-koshtiv-na-potrebi-armiyi' target='_blank' rel='noreferrer noopener' className='text-white border-gray-900 border-b-2 hover:border-white text-center'>{t('main.ukrSupport')}</a>