perf: avoid blocking page render on data refresh
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 41s

This commit is contained in:
Cauê Faleiros
2026-05-28 11:46:11 -03:00
parent 6dbc5ee190
commit f4cf4366ee
3 changed files with 36 additions and 17 deletions

View File

@@ -43,6 +43,14 @@ const ProductDetails = () => {
return new Intl.NumberFormat('pt-BR', { style: 'currency', currency: 'BRL' }).format(value);
};
if (!productInfo && ordersData.length === 0) {
return (
<div className="text-center py-12">
<p className="text-zinc-500 dark:text-dark-muted font-medium">Carregando produto...</p>
</div>
);
}
if (!productInfo) {
return (
<div className="text-center py-12">