Use ApiErrorNotice in funnels

This commit is contained in:
Adam Rutkowski 2024-01-03 14:10:38 +01:00
parent 70bee07632
commit 5929de248e

View File

@ -5,6 +5,7 @@ import FunnelTooltip from './funnel-tooltip.js'
import ChartDataLabels from 'chartjs-plugin-datalabels'
import numberFormatter from '../util/number-formatter'
import Bar from '../stats/bar'
import { ApiErrorNotice } from '../api'
import RocketIcon from '../stats/modals/rocket-icon'
@ -275,12 +276,7 @@ export default function Funnel(props) {
return (
<>
{header()}
<div className="text-center text-gray-900 dark:text-gray-100 mt-16">
<RocketIcon />
<div className="text-lg font-bold">Oops! Something went wrong</div>
<div className="text-lg">{error.message ? error.message : 'Failed to render funnel'}</div>
<div className="text-xs mt-8">Please try refreshing your browser or selecting the funnel again.</div>
</div>
<ApiErrorNotice error={error} />
</>
)
}