4
0
forked from crowetic/commerce

Fixes TypeScript errors. (#980)

This commit is contained in:
Michael Novotny 2023-04-21 12:56:16 -05:00 committed by GitHub
parent 8ff670d7d6
commit e3785d0269
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -10,7 +10,7 @@ export const metadata = {
openGraph: { openGraph: {
images: [ images: [
{ {
url: `/api/og?title=${encodeURIComponent(process.env.SITE_NAME)}`, url: `/api/og?title=${encodeURIComponent(process.env.SITE_NAME || '')}`,
width: 1200, width: 1200,
height: 630 height: 630
} }

View File

@ -256,12 +256,11 @@ export async function getCollection(handle: string): Promise<Collection | undefi
return reshapeCollection(res.body.data.collection); return reshapeCollection(res.body.data.collection);
} }
export async function getCollectionProducts(handle: string, limit?: number): Promise<Product[]> { export async function getCollectionProducts(handle: string): Promise<Product[]> {
const res = await shopifyFetch<ShopifyCollectionProductsOperation>({ const res = await shopifyFetch<ShopifyCollectionProductsOperation>({
query: getCollectionProductsQuery, query: getCollectionProductsQuery,
variables: { variables: {
handle, handle
first: limit
} }
}); });