Skip to content

Commit 737fdc0

Browse files
committed
fix: cleanup
1 parent 0dbcd13 commit 737fdc0

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

src/app/products/[handle]/page.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
1010
const { products } = await medusaRequest("GET", "/products", {
1111
query: {
1212
handle: params.handle,
13-
// expand: "variants,variants.prices,thumbnail",
1413
},
1514
}).then((res) => res.body)
1615

1716
const product = products[0]
1817

1918
return {
20-
title: `${products.title} | Acme Store`,
19+
title: `${product.title} | Acme Store`,
2120
description: `${product.title}`,
2221
openGraph: {
2322
title: `${product.title} | Acme Store`,
@@ -31,7 +30,6 @@ export default async function CollectionPage({ params }: Props) {
3130
const { products } = await medusaRequest("GET", "/products", {
3231
query: {
3332
handle: params.handle,
34-
// expand: "variants,variants.prices",
3533
},
3634
}).then((res) => res.body)
3735

src/lib/data/index.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,6 @@ export const fetchProductsList = async ({
126126
...queryParams,
127127
})
128128

129-
console.log({ pageParam, ...queryParams })
130-
131-
console.log({ products, count, offset })
132-
133129
return {
134130
response: { products, count },
135131
nextPage: count > offset + 12 ? offset + 12 : null,

src/modules/collections/templates/index.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,11 @@ const CollectionTemplate: React.FC<CollectionTemplateProps> = ({
8686
<h1>{collection.title}</h1>
8787
</div>
8888
<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+
))}
9794
{isFetchingNextPage &&
9895
repeat(getNumberOfSkeletons(infiniteData?.pages)).map((index) => (
9996
<li key={index}>

0 commit comments

Comments
 (0)