Skip to content

Commit f60a461

Browse files
File changes
1 parent 54cecae commit f60a461

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

src/pages/LifecycleAnalyticsDashboard.jsx

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,26 @@ export default function LifecycleAnalyticsDashboard() {
184184
</div>
185185

186186
{/* State Distribution */}
187-
<StateDistributionChart data={stateDistribution} />
187+
{Object.keys(safeStateDistribution).length === 0 ? (
188+
<Card className="bg-slate-900 border-slate-800">
189+
<CardContent className="py-8 text-center">
190+
<p className="text-slate-400">No state distribution data available</p>
191+
</CardContent>
192+
</Card>
193+
) : (
194+
<StateDistributionChart data={safeStateDistribution} />
195+
)}
188196

189197
{/* Churn Trends */}
190-
<ChurnTrendChart data={churnTrends} timeRange={timeRange} />
198+
{safeChurnTrends.length === 0 ? (
199+
<Card className="bg-slate-900 border-slate-800">
200+
<CardContent className="py-8 text-center">
201+
<p className="text-slate-400">No churn trend data available</p>
202+
</CardContent>
203+
</Card>
204+
) : (
205+
<ChurnTrendChart data={safeChurnTrends} timeRange={timeRange} />
206+
)}
191207

192208
{/* Three Column Layout */}
193209
<div className="grid grid-cols-3 gap-6">

0 commit comments

Comments
 (0)