'use client' import { useState } from 'react' import type { ModelData } from '@/lib/types' import ScoreDistribution from '@/components/ScoreDistribution' import MetricBarAccordion from '@/components/MetricBarAccordion' type View = 'dots' | 'bars' const VIEWS: { key: View; label: string }[] = [ { key: 'dots', label: 'Dots' }, { key: 'bars', label: 'Bars' }, ] export default function ClusterView({ models, maxFairness, }: { models: ModelData[] maxFairness: number }) { const [view, setView] = useState('dots') return (
{/* Dots ⇄ Bars toggle */}
{VIEWS.map((v, i) => ( ))}
{view === 'dots' ? : }
) }