Dashboard Executivo de Relatórios
{/* Métricas principais */}
- {metricas.map((m) => (
-
- {m.icon}
- {m.value}
- {m.label}
-
- ))}
+ {loading ? (
+ // simple skeletons while loading to avoid showing fake data
+ Array.from({ length: 5 }).map((_, i) => (
+
+ ))
+ ) : (
+ metricsState.map((m) => (
+
+ {m.icon}
+ {m.value}
+ {m.label}
+
+ ))
+ )}
{/* Gráficos e Relatórios */}
@@ -104,15 +352,19 @@ export default function RelatoriosPage() {
Consultas por Período
- Carregando dados...
+ ) : (
+ Carregando dados...
+ ) : (
+ Carregando dados...
+ ) : (
+ Carregando dados...
+ ) : (
+