ui: fix funnel wording

This commit is contained in:
nick-delirium 2025-02-26 17:33:13 +01:00
parent d79665cbea
commit 6873f1c56b
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0

View file

@ -88,13 +88,16 @@ function FunnelWidget(props: Props) {
const viewType = metric?.viewType;
const isHorizontal = viewType === 'columnChart';
const noEvents = metric.series[0].filter.filters.length === 0;
const isUsers = metric?.metricFormat === 'userCount';
return (
<NoContent
style={{ minHeight: 220 }}
title={
<div className="flex items-center text-lg">
<Icon name="info-circle" className="mr-2" size="18" />
{noEvents ? 'Select an event to start seeing the funnel' : 'No data available for the selected period.'}
{noEvents
? 'Select an event to start seeing the funnel'
: 'No data available for the selected period.'}
</div>
}
show={!stages || stages.length === 0}
@ -142,7 +145,7 @@ function FunnelWidget(props: Props) {
<div className="flex items-center">
<span className="text-base font-medium mr-2">Total conversion</span>
<Tooltip
title={`${funnel.totalConversions} Sessions ${funnel.totalConversionsPercentage}%`}
title={`${funnel.totalConversions} ${isUsers ? 'Users' : 'Sessions'} ${funnel.totalConversionsPercentage}%`}
>
<Tag
bordered={false}