import './WeeklySummary.css'; function WeeklySummary({ summary, recommendation, weekKey, isCurrentWeek, weeksOfData, longestRun, hasPrevWeek, hasNextWeek, onPrevWeek, onNextWeek }) { const hasRuns = summary.run_count > 0; return (

{isCurrentWeek ? 'This Week' : 'Week'} {weekKey}

{hasRuns ? ( <>
{summary.total_distance_km.toFixed(1)} km total
{summary.total_training_load.toFixed(0)} training load
{summary.run_count} runs
{summary.avg_pace.toFixed(1)} min/km avg
{longestRun && (

Single Run Cap (BJSM 30-day) Overuse injury risk increases when a single session exceeds 10% of the longest run in the past 30 days. Read the paper →

Longest run (30d) {longestRun.longest_km} km
Max next run (+10%) {longestRun.threshold_km} km
)}

Next Week Target (ACWR, {weeksOfData || 1}w avg) The Acute:Chronic Workload Ratio compares your recent training to your rolling average over the last {weeksOfData || 1} week{(weeksOfData || 1) > 1 ? 's' : ''} (up to 4). A safe range is 0.8–1.3× chronic load. Read the paper →

Distance {recommendation.min_distance} – {recommendation.max_distance} km
Training Load {recommendation.min_load} – {recommendation.max_load}
) : (

No runs logged this week yet. Add your first run to see stats and recommendations.

)}
); } export default WeeklySummary;