Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
improve(web): hide the analytics bar axis when there are no comments or reactions
Richie McIlroy7b3716097e4e
diff --git a/apps/web/app/(org)/dashboard/analytics/components/TrafficChart.tsx b/apps/web/app/(org)/dashboard/analytics/components/TrafficChart.tsxindex 0e47a3296..54a644856 100644--- a/apps/web/app/(org)/dashboard/analytics/components/TrafficChart.tsx+++ b/apps/web/app/(org)/dashboard/analytics/components/TrafficChart.tsx@@ -166,7 +166,9 @@ export default function TrafficChart({const lineMetrics = metrics.filter((m) => METRIC_META[m].kind === "line");const barMetrics = metrics.filter((m) => METRIC_META[m].kind === "bar");- const barsOnRightAxis = lineMetrics.length > 0 && barMetrics.length > 0;+ const hasBarData = data.some((point) => barMetrics.some((m) => point[m] > 0));+ const barsOnRightAxis =+ lineMetrics.length > 0 && barMetrics.length > 0 && hasBarData;const marginRight = barsOnRightAxis ? 44 : 16;const n = data.length;