File tree Expand file tree Collapse file tree 3 files changed +6
-15
lines changed
modules/collections/templates Expand file tree Collapse file tree 3 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -10,14 +10,13 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
10
10
const { products } = await medusaRequest ( "GET" , "/products" , {
11
11
query : {
12
12
handle : params . handle ,
13
- // expand: "variants,variants.prices,thumbnail",
14
13
} ,
15
14
} ) . then ( ( res ) => res . body )
16
15
17
16
const product = products [ 0 ]
18
17
19
18
return {
20
- title : `${ products . title } | Acme Store` ,
19
+ title : `${ product . title } | Acme Store` ,
21
20
description : `${ product . title } ` ,
22
21
openGraph : {
23
22
title : `${ product . title } | Acme Store` ,
@@ -31,7 +30,6 @@ export default async function CollectionPage({ params }: Props) {
31
30
const { products } = await medusaRequest ( "GET" , "/products" , {
32
31
query : {
33
32
handle : params . handle ,
34
- // expand: "variants,variants.prices",
35
33
} ,
36
34
} ) . then ( ( res ) => res . body )
37
35
Original file line number Diff line number Diff line change @@ -126,10 +126,6 @@ export const fetchProductsList = async ({
126
126
...queryParams ,
127
127
} )
128
128
129
- console . log ( { pageParam, ...queryParams } )
130
-
131
- console . log ( { products, count, offset } )
132
-
133
129
return {
134
130
response : { products, count } ,
135
131
nextPage : count > offset + 12 ? offset + 12 : null ,
Original file line number Diff line number Diff line change @@ -86,14 +86,11 @@ const CollectionTemplate: React.FC<CollectionTemplateProps> = ({
86
86
< h1 > { collection . title } </ h1 >
87
87
</ div >
88
88
< ul className = "grid grid-cols-2 small:grid-cols-3 medium:grid-cols-4 gap-x-4 gap-y-8" >
89
- { previews . map ( ( p ) => {
90
- console . log ( p )
91
- return (
92
- < li key = { p . id } >
93
- < ProductPreview { ...p } />
94
- </ li >
95
- )
96
- } ) }
89
+ { previews . map ( ( p ) => (
90
+ < li key = { p . id } >
91
+ < ProductPreview { ...p } />
92
+ </ li >
93
+ ) ) }
97
94
{ isFetchingNextPage &&
98
95
repeat ( getNumberOfSkeletons ( infiniteData ?. pages ) ) . map ( ( index ) => (
99
96
< li key = { index } >
You can’t perform that action at this time.
0 commit comments