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() { />