refactor: update CustomTooltip types in chart components for better type safety
- Enhanced type definitions for the payload in CustomTooltip across multiple chart components to improve TypeScript support and maintainability.
This commit is contained in:
@@ -47,14 +47,21 @@ export function PriorityBreakdownChart({
|
||||
total: item.total,
|
||||
}));
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const CustomTooltip = ({
|
||||
active,
|
||||
payload,
|
||||
label,
|
||||
}: {
|
||||
active?: boolean;
|
||||
payload?: any[];
|
||||
payload?: Array<{
|
||||
payload: {
|
||||
priority: string;
|
||||
Terminées: number;
|
||||
'En cours': number;
|
||||
completionRate: number;
|
||||
total: number;
|
||||
};
|
||||
}>;
|
||||
label?: string;
|
||||
}) => {
|
||||
if (active && payload && payload.length) {
|
||||
|
||||
Reference in New Issue
Block a user