@@ -4,7 +4,7 @@ import * as React from "react"
44import { Bar , BarChart , CartesianGrid , XAxis , YAxis , Tooltip , ResponsiveContainer , Cell } from "recharts" // Added YAxis
55import { Card , CardContent , CardHeader , CardTitle , CardDescription } from "@/components/ui/card"
66import { Table , TableBody , TableCell , TableHead , TableHeader , TableRow } from "@/components/ui/table"
7- import { Tabs , TabsList , TabsTrigger } from "@/components/ui/tabs"
7+ // Tabs imports removed
88import { Badge } from "@/components/ui/badge"
99import { Button } from "@/components/ui/button"
1010import { Input } from "@/components/ui/input"
@@ -29,7 +29,7 @@ import {
2929 getPaginationRowModel // Added
3030} from "@tanstack/react-table"
3131import { VeeamSession } from "@/lib/types/veeam"
32- import { ArrowUpDown , CheckCircle2 , AlertTriangle , XCircle , HelpCircle , Columns , ChevronLeft , ChevronRight , X } from "lucide-react" // Added icons
32+ import { ArrowUpDown , CheckCircle2 , AlertTriangle , XCircle , HelpCircle , Columns , ChevronLeft , ChevronRight } from "lucide-react" // Added icons
3333import { DataTableFacetedFilter } from "@/components/data-table-faceted-filter"
3434import { Skeleton } from "@/components/ui/skeleton"
3535
@@ -152,13 +152,20 @@ export const columns: ColumnDef<VeeamSession>[] = [
152152]
153153
154154// Custom Tooltip Component
155- const CustomTooltip = ( { active, payload, label } : any ) => {
155+ interface TooltipPayload {
156+ name : string
157+ value : number
158+ color ?: string
159+ payload ?: unknown
160+ }
161+
162+ const CustomTooltip = ( { active, payload, label } : { active ?: boolean , payload ?: TooltipPayload [ ] , label ?: string } ) => {
156163 if ( active && payload && payload . length ) {
157164 return (
158165 < div className = "border border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl" >
159- < div className = "font-medium text-foreground" > { new Date ( label ) . toLocaleDateString ( undefined , { month : 'short' , day : 'numeric' , year : 'numeric' } ) } </ div >
166+ < div className = "font-medium text-foreground" > { new Date ( label || "" ) . toLocaleDateString ( undefined , { month : 'short' , day : 'numeric' , year : 'numeric' } ) } </ div >
160167 < div className = "grid gap-1.5" >
161- { payload . map ( ( entry : any , index : number ) => {
168+ { payload . map ( ( entry : TooltipPayload , index : number ) => {
162169 if ( entry . value === 0 ) return null ; // Hide if value is 0
163170 const colorMap : Record < string , string > = {
164171 "Success" : "#22c55e" ,
0 commit comments