From 1044f228f217763d7657eda44811d1b1df9cc95a Mon Sep 17 00:00:00 2001 From: Andrei Date: Thu, 2 Oct 2025 16:07:27 +0000 Subject: [PATCH] fix(ui): Fix homepage grid layout spacing and alignment Issue: After MUI v7 upgrade, Quick Actions and Today's Summary cards were not evenly sized - they were content-sized instead. Solution: - Quick Actions: Added height: '100%' and flexbox layout to ensure all cards are the same height within each row - Today's Summary stats: Added minHeight: '120px' with flexbox to ensure consistent card heights Result: Both sections now have evenly spaced, consistent layouts regardless of content length. --- maternal-web/app/page.tsx | 50 +++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/maternal-web/app/page.tsx b/maternal-web/app/page.tsx index cc38151..32bb9c1 100644 --- a/maternal-web/app/page.tsx +++ b/maternal-web/app/page.tsx @@ -131,11 +131,17 @@ export default function HomePage() { initial={{ opacity: 0, scale: 0.9 }} animate={{ opacity: 1, scale: 1 }} transition={{ duration: 0.3, delay: index * 0.1 }} + style={{ height: '100%' }} > router.push(action.path)} sx={{ p: 3, + height: '100%', + display: 'flex', + flexDirection: 'column', + alignItems: 'center', + justifyContent: 'center', textAlign: 'center', cursor: 'pointer', bgcolor: action.color, @@ -179,7 +185,16 @@ export default function HomePage() { ) : ( - + {dailySummary.feedingCount || 0} @@ -190,7 +205,16 @@ export default function HomePage() { - + {dailySummary.sleepTotalMinutes @@ -203,7 +227,16 @@ export default function HomePage() { - + {dailySummary.diaperCount || 0} @@ -214,7 +247,16 @@ export default function HomePage() { - + {dailySummary.medicationCount || 0}