diff --git a/apps/dashboard/src/components/report-chart/common/previous-diff-indicator.tsx b/apps/dashboard/src/components/report-chart/common/previous-diff-indicator.tsx index e33bb3f9..9bda730c 100644 --- a/apps/dashboard/src/components/report-chart/common/previous-diff-indicator.tsx +++ b/apps/dashboard/src/components/report-chart/common/previous-diff-indicator.tsx @@ -29,7 +29,7 @@ interface PreviousDiffIndicatorProps { children?: React.ReactNode; inverted?: boolean; className?: string; - size?: 'sm' | 'lg'; + size?: 'sm' | 'lg' | 'md'; } export function PreviousDiffIndicator({ @@ -80,6 +80,7 @@ export function PreviousDiffIndicator({ 'flex size-4 items-center justify-center rounded-full', variant, size === 'lg' && 'size-8', + size === 'md' && 'size-6', )} > {renderIcon()} diff --git a/apps/dashboard/src/components/report-chart/funnel/chart.tsx b/apps/dashboard/src/components/report-chart/funnel/chart.tsx index 1502a36a..e09215bd 100644 --- a/apps/dashboard/src/components/report-chart/funnel/chart.tsx +++ b/apps/dashboard/src/components/report-chart/funnel/chart.tsx @@ -39,15 +39,10 @@ export function Chart({ const { isEditMode } = useReportChartContext(); const mostDropoffs = findMostDropoffs(steps); const lastStep = last(steps)!; - const prevLastStep = last(previous.steps); + const prevLastStep = previous?.steps ? last(previous.steps) : null; return ( -