feat: remove statistics from Distinct Colors generator

This commit is contained in:
2026-02-24 09:45:09 +01:00
parent f779d4aa9d
commit d65a7c6c30
3 changed files with 0 additions and 38 deletions

View File

@@ -14,11 +14,6 @@ export default function DistinctPage() {
const [count, setCount] = useState(8); const [count, setCount] = useState(8);
const [metric, setMetric] = useState<'cie76' | 'ciede2000'>('ciede2000'); const [metric, setMetric] = useState<'cie76' | 'ciede2000'>('ciede2000');
const [colors, setColors] = useState<string[]>([]); const [colors, setColors] = useState<string[]>([]);
const [stats, setStats] = useState<{
min_distance: number;
avg_distance: number;
generation_time_ms: number;
} | null>(null);
const generateMutation = useGenerateDistinct(); const generateMutation = useGenerateDistinct();
@@ -29,7 +24,6 @@ export default function DistinctPage() {
metric, metric,
}); });
setColors(result.colors); setColors(result.colors);
setStats(result.stats);
toast.success(`Generated ${result.colors.length} distinct colors`); toast.success(`Generated ${result.colors.length} distinct colors`);
} catch (error) { } catch (error) {
toast.error('Failed to generate distinct colors'); toast.error('Failed to generate distinct colors');
@@ -100,28 +94,6 @@ export default function DistinctPage() {
This may take a few moments.. This may take a few moments..
</div> </div>
)} )}
{stats && (
<div className="pt-4 border-t space-y-2">
<h3 className="font-semibold text-sm">Statistics</h3>
<div className="space-y-1 text-sm">
<div className="flex justify-between">
<span className="text-muted-foreground">Min Distance:</span>
<span className="font-mono">{stats.min_distance.toFixed(2)}</span>
</div>
<div className="flex justify-between">
<span className="text-muted-foreground">Avg Distance:</span>
<span className="font-mono">{stats.avg_distance.toFixed(2)}</span>
</div>
<div className="flex justify-between">
<span className="text-muted-foreground">Generation Time:</span>
<span className="font-mono">
{(stats.generation_time_ms / 1000).toFixed(2)}s
</span>
</div>
</div>
</div>
)}
</div> </div>
</div> </div>

View File

@@ -152,11 +152,6 @@ export interface DistinctColorsRequest {
export interface DistinctColorsData { export interface DistinctColorsData {
colors: string[]; colors: string[];
stats: {
min_distance: number;
avg_distance: number;
generation_time_ms: number;
};
} }
export interface GradientRequest { export interface GradientRequest {

View File

@@ -292,11 +292,6 @@ export class PastelWASMClient {
const colors = generate_random_colors(request.count, true); const colors = generate_random_colors(request.count, true);
return { return {
colors, colors,
stats: {
min_distance: 0,
avg_distance: 0,
generation_time_ms: 0,
},
}; };
}); });
} }