forked from crowetic/commerce
Fixes TypeScript errors. (#980)
This commit is contained in:
parent
8ff670d7d6
commit
e3785d0269
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user