Skip to content

📈 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!

remove-chrithmas-theme

kruzhambusebda8e96566f
diff --git a/src/App.js b/src/App.js
index 37662c5ec..db59113c8 100644
--- a/src/App.js
+++ b/src/App.js
@@ -91,7 +91,7 @@ const App = () => {
const { theme } = useSelector(state => state.ui.theme)
const { error } = useSelector(state => state.errors)
const { message, type } = useSelector(state => state.alerts)
- const themeType = useSelector(state => state.ui.theme.type)
+ // const themeType = useSelector(state => state.ui.theme.type)
const accessToken = getAccessToken()
const refreshToken = getRefreshToken()
@@ -131,7 +131,7 @@ const App = () => {
if ((accessToken && refreshToken) && !authenticated) {
try {
const me = await authMe()
- dispatch(UIActions.setThemeType(me.theme))
+ // dispatch(UIActions.setThemeType(me.theme))
dispatch(authActions.loginSuccess(me))
dispatch(authActions.finishLoading())
} catch (e) {
@@ -171,7 +171,7 @@ const App = () => {
<Header
authenticated={authenticated}
theme={theme}
- themeType={themeType}
+ // themeType={themeType}
user={user}
/>
{/* {location.pathname === routes.main && (
diff --git a/src/components/Footer/index.jsx b/src/components/Footer/index.jsx
index 6681942ea..d9897b1e1 100644
--- a/src/components/Footer/index.jsx
+++ b/src/components/Footer/index.jsx
@@ -148,7 +148,7 @@ const Footer = ({ minimal, authenticated }) => {
<div className='xl:grid xl:grid-cols-3 xl:gap-8'>
<div className='space-y-8 xl:col-span-1'>
<div className='flex gap-5 flex-wrap'>
- <img className='h-10' src='/assets/logo_white_christmas.png' loading='lazy' alt='Swetrix Analytics' />
+ <img className='h-10' src='/assets/logo_white.svg' loading='lazy' alt='Swetrix Analytics' />
</div>
<p className='text-gray-300 text-base'>
{t('footer.slogan')}
diff --git a/src/components/Header/index.jsx b/src/components/Header/index.jsx
index c131d3832..6fbeaa45f 100644
--- a/src/components/Header/index.jsx
+++ b/src/components/Header/index.jsx
@@ -23,7 +23,9 @@ import routes from 'routes'
import { authActions } from 'redux/actions/auth'
import UIActions from 'redux/actions/ui'
import {
- whitelist, languages, languageFlag, isSelfhosted, BLOG_URL, THEME_TYPE, DOCS_URL,
+ whitelist, languages, languageFlag, isSelfhosted, BLOG_URL,
+ // THEME_TYPE,
+ DOCS_URL,
} from 'redux/constants'
import Dropdown from 'ui/Dropdown'
@@ -38,7 +40,9 @@ const TRIAL_STATUS_MAPPING = {
}
const Header = ({
- authenticated, theme, themeType, user,
+ authenticated, theme,
+ // themeType,
+ user,
}) => {
const { t, i18n: { language } } = useTranslation('common')
const dispatch = useDispatch()
@@ -94,7 +98,7 @@ const Header = ({
<Popover className='relative bg-white'>
{/* Computer / Laptop / Tablet layout header */}
<header className='bg-indigo-600 dark:bg-gray-750 relative overflow-x-clip'>
- {themeType === THEME_TYPE.christmas && (
+ {/* {themeType === THEME_TYPE.christmas && (
<div className='santa-claus group'>
<div className='group-hover:cursor-pointer group-hover:translate-y-[-100px] transition-all ease-linear delay-100 duration-500'>
<div className='sc-head'>
@@ -112,18 +116,19 @@ const Header = ({
</div>
<div className='sc-body' />
</div>
- )}
+ )} */}
<nav className='mx-auto px-4 sm:px-6 lg:px-8' aria-label='Top'>
<div className='w-full py-4 flex items-center justify-between border-b border-indigo-500 dark:border-gray-300 lg:border-none'>
<div className='flex items-center'>
{/* Logo */}
<Link to={routes.main}>
<span className='sr-only'>Swetrix</span>
- {themeType === THEME_TYPE.christmas ? (
+ {/* {themeType === THEME_TYPE.christmas ? (
<img className='h-10' src='/assets/logo_white_christmas.png' alt='Swetrix' />
) : (
<img className='h-10' src='/assets/logo_white.svg' alt='Swetrix' />
- )}
+ )} */}
+ <img className='h-10' src='/assets/logo_white.svg' alt='Swetrix' />
</Link>
<div className='hidden ml-10 space-x-1 lg:flex'>
@@ -303,11 +308,12 @@ const Header = ({
<Link to={routes.main}>
<span className='sr-only'>Swetrix</span>
{theme === 'dark' ? (
- themeType === THEME_TYPE.christmas ? (
- <img className='h-10' src='/assets/logo_white_christmas.png' alt='Swetrix' />
- ) : (
- <img className='h-10' src='/assets/logo_white.svg' alt='Swetrix' />
- )
+ // themeType === THEME_TYPE.christmas ? (
+ // <img className='h-10' src='/assets/logo_white_christmas.png' alt='Swetrix' />
+ // ) : (
+ // <img className='h-10' src='/assets/logo_white.svg' alt='Swetrix' />
+ // )
+ <img className='h-10' src='/assets/logo_white.svg' alt='Swetrix' />
) : (
<img className='h-10' src='/assets/logo_blue.svg' alt='Swetrix' />
)}
@@ -408,7 +414,7 @@ const Header = ({
Header.propTypes = {
authenticated: PropTypes.bool.isRequired,
theme: PropTypes.string.isRequired,
- themeType: PropTypes.string.isRequired,
+ // themeType: PropTypes.string.isRequired,
// eslint-disable-next-line react/forbid-prop-types
user: PropTypes.object,
}
diff --git a/src/ui/Button.jsx b/src/ui/Button.jsx
index b7296fe3b..0e95519ae 100644
--- a/src/ui/Button.jsx
+++ b/src/ui/Button.jsx
@@ -2,15 +2,15 @@
import React, { memo } from 'react'
import cx from 'clsx'
import PropTypes from 'prop-types'
-import { useSelector } from 'react-redux'
-import { THEME_TYPE } from 'redux/constants'
+// import { useSelector } from 'react-redux'
+// import { THEME_TYPE } from 'redux/constants'
import Spin from './icons/Spin'
import './ButtonChristmas.css'
const Button = ({
text, children, primary, secondary, danger, onClick, white, small, regular, large, giant, type, className, loading, semiSmall, semiDanger, noBorder,
}) => {
- const themeType = useSelector((state) => state.ui.theme.type)
+ // const themeType = useSelector((state) => state.ui.theme.type)
return (
<button
@@ -31,7 +31,7 @@ const Button = ({
'cursor-not-allowed': loading,
}, className)}
>
- {themeType === THEME_TYPE.christmas ? (
+ {/* {themeType === THEME_TYPE.christmas ? (
<span className={cx('inline-flex items-center', {
button3: text,
button2: semiSmall || regular || large || giant,
@@ -49,7 +49,11 @@ const Button = ({
)}
{text || children}
</>
+ )} */}
+ {loading && (
+ <Spin />
)}
+ {text || children}
</button>
)
}