forked from cardosofelipe/fast-next-template
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user