From b699a521fe735eea43ce5dd946ad656c9bab6eb9 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 8 Dec 2024 19:05:45 +0100 Subject: [PATCH] manage empty insight --- src/pages/nutrition/LinksToProduct.tsx | 2 ++ src/pages/nutrition/index.tsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/nutrition/LinksToProduct.tsx b/src/pages/nutrition/LinksToProduct.tsx index 3a23f3437..673a9f2c1 100644 --- a/src/pages/nutrition/LinksToProduct.tsx +++ b/src/pages/nutrition/LinksToProduct.tsx @@ -24,6 +24,7 @@ export default function LinkToProduct( variant="outlined" startIcon={} sx={{ minWidth: 150 }} + disabled={!barcode} > {t("questions.view")} @@ -35,6 +36,7 @@ export default function LinkToProduct( variant="contained" startIcon={} sx={{ ml: 2, minWidth: 150 }} + disabled={!barcode} > {t("questions.edit")} diff --git a/src/pages/nutrition/index.tsx b/src/pages/nutrition/index.tsx index 753f9f403..8b97c4b20 100644 --- a/src/pages/nutrition/index.tsx +++ b/src/pages/nutrition/index.tsx @@ -99,7 +99,7 @@ export default function Nutrition() { />