Skip to content

Commit

Permalink
Add description to search results
Browse files Browse the repository at this point in the history
  • Loading branch information
w3bdesign committed Jul 5, 2020
1 parent ac56b47 commit c87fcca
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions components/Search/SearchResults.component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
* @param {Object} props
*/
const SearchResults = ({
hit: { product_image, product_name, regular_price, sale_price, on_sale },
hit: {
product_image,
product_name,
regular_price,
sale_price,
on_sale,
short_description,
},
}) => {
return (
<article className="hit">
Expand All @@ -22,15 +29,13 @@ const SearchResults = ({
<br />
{on_sale && (
<>
<span className="text-base line-through">
kr {regular_price}
</span>
<span className="text-base line-through">kr {regular_price}</span>
<span className="ml-2 text-base">kr {sale_price}</span>
</>
)}
{!on_sale && (
<span className="text-base">kr {regular_price}</span>
)}
{!on_sale && <span className="text-base">kr {regular_price}</span>}
<br />
<span className="text-base">{short_description}</span>
</div>
</div>
</article>
Expand Down

0 comments on commit c87fcca

Please sign in to comment.