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!

added dropdown label

Blue Mouseb1c748352fbb
diff --git a/src/pages/Project/View/ViewProject.jsx b/src/pages/Project/View/ViewProject.jsx
index 729f7447b..769d3378f 100644
--- a/src/pages/Project/View/ViewProject.jsx
+++ b/src/pages/Project/View/ViewProject.jsx
@@ -565,7 +565,7 @@ const ViewProject = ({
<Dropdown
items={periodPairs}
title={activePeriod.label}
- labelExtractor={(pair) => pair.label}
+ labelExtractor={(pair) => pair.dropdownLabel || pair.label}
keyExtractor={(pair) => pair.label}
onSelect={(pair) => {
if (pair.isCustomDate) {
diff --git a/src/redux/constants/index.js b/src/redux/constants/index.js
index 5bb66213b..a55794eaf 100644
--- a/src/redux/constants/index.js
+++ b/src/redux/constants/index.js
@@ -39,7 +39,8 @@ export const tbPeriodPairs = (t, tbs, dates) => [{
tbs: ['month'],
access: 'paid',
}, {
- label: dates ? `${dates[0].toLocaleDateString()}-${dates[1].toLocaleDateString()}` : t('project.custom'),
+ label: dates ? `${dates[0].toLocaleDateString()} - ${dates[1].toLocaleDateString()}` : t('project.custom'),
+ dropdownLabel: t('project.custom'),
isCustomDate: true,
period: 'custom',
tbs: tbs || ['custom'],