Skip to content

Commit

Permalink
manage empty insight
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette committed Dec 8, 2024
1 parent a7df72d commit b699a52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/pages/nutrition/LinksToProduct.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export default function LinkToProduct(
variant="outlined"
startIcon={<VisibilityIcon />}
sx={{ minWidth: 150 }}
disabled={!barcode}
>
{t("questions.view")}
</Button>
Expand All @@ -35,6 +36,7 @@ export default function LinkToProduct(
variant="contained"
startIcon={<EditIcon />}
sx={{ ml: 2, minWidth: 150 }}
disabled={!barcode}
>
{t("questions.edit")}
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/nutrition/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default function Nutrition() {
/>
</Box>
<LinksToProduct
barcode={insight.barcode}
barcode={insight?.barcode}
count={count}
sx={{ mb: 2 }}
/>
Expand Down

0 comments on commit b699a52

Please sign in to comment.