Skip to content

Commit

Permalink
feat: add link to product from shopping cart
Browse files Browse the repository at this point in the history
  • Loading branch information
jsapro committed Jan 6, 2024
1 parent 0bbb4e6 commit 6a756bd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/components/shopping-item/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,14 @@ const ShoppingItem: React.FC<ShoppingItemProps> = (props) => {
</Link>
<div className={styles.item__container}>
<div className={`${styles['item__title-container']}`}>
<p className={`text_type_u ${styles.item__title}`}>{`${product.name}, ${
amount + measureUnit
}`}</p>
<Link
className={styles.item__link}
to={`/catalog/${product.category}/${product.id}`}
>
<p className={`text_type_u ${styles.item__title}`}>{`${product.name}, ${
amount + measureUnit
}`}</p>
</Link>
</div>
<div className={styles.item__weight}>
<button
Expand Down
4 changes: 4 additions & 0 deletions src/components/shopping-item/shopping-item.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,7 @@
width: 100%;
max-width: 100px;
}

.item__link {
text-decoration: none;
}

0 comments on commit 6a756bd

Please sign in to comment.