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 filters showing twice

Blue Mousefd3decd324a6
diff --git a/web/app/pages/Project/View/ViewProject.tsx b/web/app/pages/Project/View/ViewProject.tsx
index ccd8134e0..08b690f59 100644
--- a/web/app/pages/Project/View/ViewProject.tsx
+++ b/web/app/pages/Project/View/ViewProject.tsx
@@ -3404,7 +3404,7 @@ const ViewProject = () => {
) : null}
{activeTab === PROJECT_TABS.sessions && !activePSID ? (
<>
- <Filters tnMapping={tnMapping} />
+ {!_isEmpty(sessions) ? <Filters tnMapping={tnMapping} /> : null}
{(sessionsLoading === null || sessionsLoading) && _isEmpty(sessions) ? <Loader /> : null}
{typeof sessionsLoading === 'boolean' && !sessionsLoading && _isEmpty(sessions) ? (
<NoEvents filters={filters} />
@@ -3501,7 +3501,7 @@ const ViewProject = () => {
) : null}
{activeTab === PROJECT_TABS.errors && !activeEID ? (
<>
- <Filters tnMapping={tnMapping} />
+ {!_isEmpty(errors) ? <Filters tnMapping={tnMapping} /> : null}
{(errorsLoading === null || errorsLoading) && _isEmpty(errors) ? <Loader /> : null}
{typeof errorsLoading === 'boolean' && !errorsLoading && _isEmpty(errors) ? (
<NoEvents filters={filters} />
@@ -3862,7 +3862,7 @@ const ViewProject = () => {
id='dataChart'
/>
</div>
- <Filters tnMapping={tnMapping} />
+ {!isPanelsDataEmpty ? <Filters tnMapping={tnMapping} /> : null}
<CustomMetrics
metrics={customMetrics}
onRemoveMetric={(id) => onRemoveCustomMetric(id)}
@@ -4176,7 +4176,7 @@ const ViewProject = () => {
id='dataChart'
/>
</div>
- <Filters tnMapping={tnMapping} />
+ {!isPanelsDataEmptyPerf ? <Filters tnMapping={tnMapping} /> : null}
<div className='mt-3 grid grid-cols-1 gap-3 sm:grid-cols-2'>
{!_isEmpty(panelsDataPerf.types)
? _map(PERFORMANCE_PANELS_ORDER, (type: keyof typeof tnMapping) => {
diff --git a/web/app/pages/Project/View/components/NoEvents.tsx b/web/app/pages/Project/View/components/NoEvents.tsx
index 33ced945a..830c45a35 100644
--- a/web/app/pages/Project/View/components/NoEvents.tsx
+++ b/web/app/pages/Project/View/components/NoEvents.tsx
@@ -4,7 +4,6 @@ import { useTranslation } from 'react-i18next'
import { Filter } from '../interfaces/traffic'
import { typeNameMapping } from '../ViewProject.helpers'
-
import Filters from './Filters'
interface NoEventsProps {