Skip to content

Commit c87fcca

Browse files
committed
Add description to search results
1 parent ac56b47 commit c87fcca

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

components/Search/SearchResults.component.jsx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@
33
* @param {Object} props
44
*/
55
const SearchResults = ({
6-
hit: { product_image, product_name, regular_price, sale_price, on_sale },
6+
hit: {
7+
product_image,
8+
product_name,
9+
regular_price,
10+
sale_price,
11+
on_sale,
12+
short_description,
13+
},
714
}) => {
815
return (
916
<article className="hit">
@@ -22,15 +29,13 @@ const SearchResults = ({
2229
<br />
2330
{on_sale && (
2431
<>
25-
<span className="text-base line-through">
26-
kr {regular_price}
27-
</span>
32+
<span className="text-base line-through">kr {regular_price}</span>
2833
<span className="ml-2 text-base">kr {sale_price}</span>
2934
</>
3035
)}
31-
{!on_sale && (
32-
<span className="text-base">kr {regular_price}</span>
33-
)}
36+
{!on_sale && <span className="text-base">kr {regular_price}</span>}
37+
<br />
38+
<span className="text-base">{short_description}</span>
3439
</div>
3540
</div>
3641
</article>

0 commit comments

Comments
 (0)