From e3785d0269af597bbe149f14ad964f1021a90494 Mon Sep 17 00:00:00 2001 From: Michael Novotny Date: Fri, 21 Apr 2023 12:56:16 -0500 Subject: [PATCH] Fixes TypeScript errors. (#980) --- app/page.tsx | 2 +- lib/shopify/index.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/page.tsx b/app/page.tsx index d398f0fbb..a928be52e 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -10,7 +10,7 @@ export const metadata = { openGraph: { images: [ { - url: `/api/og?title=${encodeURIComponent(process.env.SITE_NAME)}`, + url: `/api/og?title=${encodeURIComponent(process.env.SITE_NAME || '')}`, width: 1200, height: 630 } diff --git a/lib/shopify/index.ts b/lib/shopify/index.ts index c362ea332..2c020b5d5 100644 --- a/lib/shopify/index.ts +++ b/lib/shopify/index.ts @@ -256,12 +256,11 @@ export async function getCollection(handle: string): Promise { +export async function getCollectionProducts(handle: string): Promise { const res = await shopifyFetch({ query: getCollectionProductsQuery, variables: { - handle, - first: limit + handle } });