From 36a11e37932a09889a31c9542d622bd5920def40 Mon Sep 17 00:00:00 2001 From: Alejandro Rosales Date: Mon, 23 Mar 2026 16:15:43 -0600 Subject: [PATCH] Improve conditional rendering and styling for empty state in MapaCurricularPage --- src/routes/planes/$planId/_detalle/mapa.tsx | 45 ++++++++++++++++----- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/src/routes/planes/$planId/_detalle/mapa.tsx b/src/routes/planes/$planId/_detalle/mapa.tsx index 7dbcad0..7057849 100644 --- a/src/routes/planes/$planId/_detalle/mapa.tsx +++ b/src/routes/planes/$planId/_detalle/mapa.tsx @@ -859,10 +859,27 @@ function MapaCurricularPage() { ))} -
-
Cr: {sub.cr}
-
HD: {sub.hd}
-
HI: {sub.hi}
+
+ {sub.cr === 0 && sub.hd === 0 && sub.hi === 0 ? ( +
+ ) : ( + <> +
+
+ Cr: {sub.cr} +
+
+ HD: {sub.hd} • HI: {sub.hi} +
+
+ + )}
) @@ -876,15 +893,25 @@ function MapaCurricularPage() { {ciclosArray.map((ciclo) => { const t = getTotalesCiclo(ciclo) + const isEmpty = t.cr === 0 && t.hd === 0 && t.hi === 0 + return (
-
Cr: {t.cr}
-
- HD: {t.hd} • HI: {t.hi} -
+ {isEmpty ? ( +
+ ) : ( + <> +
Cr: {t.cr}
+
+ HD: {t.hd} • HI: {t.hi} +
+ + )}
) })}