Refactor components and scripts for improved typing, cleanup unused imports

- Updated chart components (`OrganizationDistributionChart`, `RegistrationActivityChart`, `UserGrowthChart`) with stricter TypeScript interfaces (`TooltipProps`).
- Removed unused imports (`useState`, `Badge`, `API_BASE_URL`) from `DemoModeBanner` and MSW scripts.
- Adjusted MSW function parameters (`_method`, `_operation`) to suppress unused variable warnings.
This commit is contained in:
Felipe Cardoso
2025-11-24 20:30:58 +01:00
parent e79215b4de
commit 6b970765ba
5 changed files with 20 additions and 8 deletions

View File

@@ -21,7 +21,12 @@ interface OrganizationDistributionChartProps {
}
// Custom tooltip with proper theme colors
const CustomTooltip = ({ active, payload }: any) => {
interface TooltipProps {
active?: boolean;
payload?: Array<{ payload: OrgDistributionData; value: number }>;
}
const CustomTooltip = ({ active, payload }: TooltipProps) => {
if (active && payload && payload.length) {
return (
<div

View File

@@ -30,7 +30,12 @@ interface RegistrationActivityChartProps {
}
// Custom tooltip with proper theme colors
const CustomTooltip = ({ active, payload }: any) => {
interface TooltipProps {
active?: boolean;
payload?: Array<{ payload: RegistrationActivityData; value: number }>;
}
const CustomTooltip = ({ active, payload }: TooltipProps) => {
if (active && payload && payload.length) {
return (
<div

View File

@@ -31,7 +31,12 @@ export interface UserGrowthChartProps {
}
// Custom tooltip with proper theme colors
const CustomTooltip = ({ active, payload }: any) => {
interface TooltipProps {
active?: boolean;
payload?: Array<{ payload: UserGrowthData; value: number }>;
}
const CustomTooltip = ({ active, payload }: TooltipProps) => {
if (active && payload && payload.length) {
return (
<div

View File

@@ -7,10 +7,8 @@
'use client';
import { useState } from 'react';
import config from '@/config/app.config';
import { Sparkles } from 'lucide-react';
import { Badge } from '@/components/ui/badge';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
export function DemoModeBanner() {