import React from 'react'; import { useTranslation } from '../../i18n/LanguageContext'; const scoreToPercent = (score) => Math.round(Math.max(0, Math.min(1.5, score)) * 100); export default function WeaknessPriorityList({ weaknesses = [] }) { const t = useTranslation(); if (!weaknesses.length) { return (
{index + 1}. {item.name}
{scoreToPercent(item.priorityScore)}{t('weakness.gap', { score: item.gapScore.toFixed(2) })}
{t('weakness.consistency', { score: item.consistencyScore.toFixed(2) })}
{t('weakness.trend', { score: item.trendDelta.toFixed(2) })}