Skip to content

Commit

Permalink
added condition to remove 'share' when status is different from publi…
Browse files Browse the repository at this point in the history
…shed
  • Loading branch information
jandsonrj committed Jul 18, 2023
1 parent 6f6cf19 commit ba52710
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions frontend/components/ProductDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,16 +243,20 @@ export default function ProductDetail({ productId, internalName }) {
spacing={2}
>
<Typography variant="h4">{product.display_name}</Typography>
<IconButton onClick={handleShareDialogOpen}>
<ShareIcon />
</IconButton>
{product.official_product === true && (
<Chip
variant="outlined"
color="success"
label="Official Product"
icon={<VerifiedIcon />}
/>
{product.status === 1 && (
<>
<IconButton onClick={handleShareDialogOpen}>
<ShareIcon />
</IconButton>
{product.official_product && (
<Chip
variant="outlined"
color="success"
label="Official Product"
icon={<VerifiedIcon />}
/>
)}
</>
)}
</Stack>
<Stack
Expand Down

0 comments on commit ba52710

Please sign in to comment.