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 (
{t('weakness.no_data')}
); } return (

{t('weakness.title')}

{weaknesses.map((item, index) => (

{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) })}

))}
); }