From 0ea81b329a882b38923eb031e17ecc629c02eca9 Mon Sep 17 00:00:00 2001 From: Mannu Date: Sun, 17 May 2026 14:46:11 +0530 Subject: [PATCH] fix(growth): move latest card to top, remove duplicate Co-Authored-By: Claude Sonnet 4.6 --- src/app/growth/page.tsx | 118 ++++++++++++++++++++-------------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/src/app/growth/page.tsx b/src/app/growth/page.tsx index befe2b3..9b61b59 100644 --- a/src/app/growth/page.tsx +++ b/src/app/growth/page.tsx @@ -406,6 +406,65 @@ export default function GrowthPage() { )} + {/* Latest Reading Card */} + {latest && ( +
+
+ Latest: {new Date(latest.measured_at).toLocaleDateString()} + {velocity && ( + + ({velocity.weight}kg/mo {velocity.direction === "up" ? "↑" : "↓"}) + + )} +
+
+ {latest.weight_kg && ( +
+
Weight
+
{latest.weight_kg} kg
+ {weightPercentile && ( +
+ {weightPercentile} percentile + {savedGoals.weightKg && ( + + → {((latest.weight_kg / savedGoals.weightKg) * 100).toFixed(0)}% of goal + + )} +
+ )} +
+ )} + {latest.height_cm && ( +
+
Height
+
{latest.height_cm} cm
+ {heightPercentile && ( +
+ {heightPercentile} percentile + {savedGoals.heightCm && ( + + → {((latest.height_cm / savedGoals.heightCm) * 100).toFixed(0)}% of goal + + )} +
+ )} +
+ )} + {latest.head_circumference_cm && ( +
+
Head
+
{latest.head_circumference_cm} cm
+ {headPercentile && ( +
+ {headPercentile} percentile +
+ )} +
+ )} +
+
+ )} + {/* WHO Standards Card - Enhanced with age-wise targets */} {child && standard && (
@@ -515,65 +574,6 @@ export default function GrowthPage() {
)} - {/* Latest Reading Card */} - {latest && ( -
-
- Latest: {new Date(latest.measured_at).toLocaleDateString()} - {velocity && ( - - ({velocity.weight}kg/mo {velocity.direction === "up" ? "↑" : "↓"}) - - )} -
-
- {latest.weight_kg && ( -
-
Weight
-
{latest.weight_kg} kg
- {weightPercentile && ( -
- {weightPercentile} percentile - {savedGoals.weightKg && ( - - → {((latest.weight_kg / savedGoals.weightKg) * 100).toFixed(0)}% of goal - - )} -
- )} -
- )} - {latest.height_cm && ( -
-
Height
-
{latest.height_cm} cm
- {heightPercentile && ( -
- {heightPercentile} percentile - {savedGoals.heightCm && ( - - → {((latest.height_cm / savedGoals.heightCm) * 100).toFixed(0)}% of goal - - )} -
- )} -
- )} - {latest.head_circumference_cm && ( -
-
Head
-
{latest.head_circumference_cm} cm
- {headPercentile && ( -
- {headPercentile} percentile -
- )} -
- )} -
-
- )} - {/* Add/Edit Form */} {showAdd && (