File tree Expand file tree Collapse file tree 1 file changed +24
-8
lines changed Expand file tree Collapse file tree 1 file changed +24
-8
lines changed Original file line number Diff line number Diff line change 55 <ais-refinement-list attribute =" brand" />
66 <ais-hits >
77 <template slot="item" slot-scope="{ item }">
8- <p >
9- <ais-highlight attribute =" product_name" :hit =" item" />
10- </p >
11- <p >
12- <ais-highlight attribute =" short_description" :hit =" item" />
8+ <NuxtLink
9+ class =" text-black cursor-pointer hover:underline"
10+ :to =" {
11+ path: '/product/' + item.product_name,
12+ query: { id: item.objectID },
13+ }"
14+ >
15+ <p class =" p-2 text-2xl font-bold text-center" >
16+ {{ item.product_name }}
17+ </p >
18+ </NuxtLink >
19+
20+ <p class =" p-2 text-xl text-center" >
21+ {{ item.short_description }}
1322 </p >
14- <p >
23+ <p class = " p-2 " >
1524 <img :src =" item.product_image" alt =" item.product_name" />
1625 </p >
26+ <p class =" p-2 text-xl text-center" >
27+ {{ item.sale_price ? item.sale_price : item.regular_price }} kr
28+ </p >
1729 </template >
1830 </ais-hits >
1931 <ais-pagination />
2032 </ais-instant-search-ssr >
2133</template >
2234
2335<script >
36+ // TODO
37+ /*
38+ Replace empty spaces with dash (-)
39+
40+ const trimmedProductName = product_name.replace(/ /g, '-');
41+ */
2442import {
2543 AisInstantSearchSsr ,
2644 AisRefinementList ,
2745 AisHits ,
28- AisHighlight ,
2946 AisSearchBox ,
3047 AisStats ,
3148 AisPagination ,
@@ -44,7 +61,6 @@ export default {
4461 AisInstantSearchSsr,
4562 AisRefinementList,
4663 AisHits,
47- AisHighlight,
4864 AisSearchBox,
4965 AisStats,
5066 AisPagination,
You can’t perform that action at this time.
0 commit comments