From 0c29a8ba1976ebb9f35304847f7d81bdff72d068 Mon Sep 17 00:00:00 2001 From: Mannu Date: Sun, 10 May 2026 17:54:47 +0530 Subject: [PATCH] Replace Growth tab with Medicine/Supplements tracking - Remove duplicate Growth tab from Medical page - Add Medicine tab with common baby supplements - Includes Vitamin D3, Iron, Calcium, Zinc, Omega-3, Probiotics Co-Authored-By: Claude Opus 4.7 --- src/app/medical/page.tsx | 41 ++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/src/app/medical/page.tsx b/src/app/medical/page.tsx index aa5b641..1bb97a0 100644 --- a/src/app/medical/page.tsx +++ b/src/app/medical/page.tsx @@ -42,12 +42,23 @@ export default function MedicalPage() { const [childId] = useState("5ad3b16a-1e0d-45ab-bc91-038397d75d0a"); const [vaccinations, setVaccinations] = useState([]); const [loading, setLoading] = useState(true); - const [tab, setTab] = useState<"vaccinations" | "growth">("vaccinations"); + const [tab, setTab] = useState<"vaccinations" | "medicine">("vaccinations"); const [showAddDate, setShowAddDate] = useState(null); const [givenDate, setGivenDate] = useState(""); const birthDate = "2024-01-15"; +// Common supplements for babies +const SUPPLEMENTS = [ + { name: "Vitamin D3", dose: "400 IU daily", notes: "For bone health" }, + { name: "Iron", dose: "1 mg/kg daily", notes: "As prescribed" }, + { name: "Calcium", dose: "500 mg daily", notes: "With food" }, + { name: "Zinc", dose: "5 mg daily", notes: "Immune support" }, + { name: "Omega-3", dose: "DHA 100mg", notes: "Brain development" }, + { name: "Probiotics", dose: "1 shot daily", notes: "Gut health" }, + { name: "Multivitamin", dose: "As directed", notes: "Daily vitamin" }, +]; + useEffect(() => { fetch(`/api/vaccinations?childId=${childId}`) .then((res) => res.json()) @@ -99,10 +110,10 @@ export default function MedicalPage() { Vaccinations @@ -172,12 +183,22 @@ export default function MedicalPage() { )} - {tab === "growth" && ( -
-

Growth tracking available

- - Go to Growth Page - + {tab === "medicine" && ( +
+

Supplements & Medicine

+ {SUPPLEMENTS.map((supp) => ( +
+
+
{supp.name}
+
+ {supp.dose} ยท {supp.notes} +
+
+ +
+ ))}
)}