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!

fix with adrue)

kruzhambus9e294103ad95
diff --git a/src/pages/Project/View/ViewProject.jsx b/src/pages/Project/View/ViewProject.jsx
index cfa998fad..da32234a1 100644
--- a/src/pages/Project/View/ViewProject.jsx
+++ b/src/pages/Project/View/ViewProject.jsx
@@ -415,7 +415,7 @@ const ViewProject = ({
}, [isLoading, showTotal, chartData, mainChart, t])
useEffect(() => {
- if (period !== "Custom") {
+ if (period !== 'Custom') {
loadAnalytics()
} else if (timeBucket !== 'Custom') {
loadAnalytics(true)
@@ -429,7 +429,7 @@ const ViewProject = ({
if (timeBucketToDays[index].lt >= days) {
setTimebucket(timeBucketToDays[index].tb[0])
setPeriodPairs(tbPeriodPairs(t, timeBucketToDays[index].tb, rangeDate))
- setPeriod("Custom")
+ setPeriod('Custom')
setProjectViewPrefs(id, 'Custom', timeBucketToDays[index].tb[0], rangeDate)
break
}
@@ -504,11 +504,7 @@ const ViewProject = ({
const updateTimebucket = (newTimebucket) => {
setTimebucket(newTimebucket)
- if (period !== 'Custom') {
- setProjectViewPrefs(id, period, newTimebucket)
- } else {
- setProjectViewPrefs(id, period, newTimebucket, rangeDate)
- }
+ setProjectViewPrefs(id, period, newTimebucket, rangeDate)
}
const openSettingsHandler = () => {
diff --git a/src/redux/constants/index.js b/src/redux/constants/index.js
index b5db82043..41dfb4fb7 100644
--- a/src/redux/constants/index.js
+++ b/src/redux/constants/index.js
@@ -42,7 +42,7 @@ export const tbPeriodPairs = (t, tbs, dates) => [{
label: dates ? `${dates[0].toLocaleDateString()}-${dates[1].toLocaleDateString()}` : "Custom date",
isCustomDate: true,
period: 'Custom',
- tbs: tbs ? tbs : ['Custom'],
+ tbs: tbs || ['Custom'],
access: 'paid',
}]
diff --git a/src/ui/Flatpicker.jsx b/src/ui/Flatpicker.jsx
index 9369f9f93..5fcac0f17 100644
--- a/src/ui/Flatpicker.jsx
+++ b/src/ui/Flatpicker.jsx
@@ -2,6 +2,7 @@ import React from "react"
import Flatpickr from "react-flatpickr"
import './Flatpicker.css'
import { getItem } from "utils/localstorage"
+
if (getItem('colour-theme') === 'light') {
import("flatpickr/dist/themes/light.css")
} else {