I fixed the filter for all the leads

This commit is contained in:
2026-06-18 12:15:44 +02:00
parent 7a42e3c41c
commit fd2d4ff976
8 changed files with 203 additions and 76 deletions
@@ -4,14 +4,14 @@ import { useState, useMemo } from "react"
import { motion } from "framer-motion"
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
interface MonthlyData {
month: string
interface IntervalData {
label: string
leads: number
closed: number
}
interface LeadsPerMonthChartProps {
data: MonthlyData[]
data: IntervalData[]
}
const BAR_GRADIENT_TOP = "#3B6AB8"
@@ -138,7 +138,7 @@ export function LeadsPerMonthChart({ data }: LeadsPerMonthChartProps) {
return (
<g
key={d.month}
key={d.label}
onMouseEnter={() => setHovered(i)}
onMouseLeave={() => setHovered(null)}
style={{ cursor: "pointer" }}
@@ -188,7 +188,7 @@ export function LeadsPerMonthChart({ data }: LeadsPerMonthChartProps) {
fontWeight={isActive ? 600 : 400}
textAnchor="middle"
>
{d.month}
{d.label}
</text>
</g>
)
@@ -216,7 +216,7 @@ export function LeadsPerMonthChart({ data }: LeadsPerMonthChartProps) {
}}
>
<div className="mb-1.5 text-xs font-semibold" style={{ color: "hsl(var(--foreground))" }}>
{activeDatum.month}
{activeDatum.label}
</div>
<div className="mb-1 flex items-center justify-between gap-4 text-xs" style={{ color: "hsl(var(--muted-foreground))" }}>
<span className="flex items-center gap-1.5">