Merge branch 'master' of https://github.com/vercel/commerce into nodejs-provider

This commit is contained in:
Luis Alvarez
2021-05-21 19:03:48 -05:00
51 changed files with 972 additions and 853 deletions

View File

@@ -24,9 +24,8 @@ export async function getStaticProps({
const pageItem = pages.find((p) => (p.url ? getSlug(p.url) === slug : false))
const data =
pageItem &&
// TODO: Shopify - Fix this type
(await commerce.getPage({
variables: { id: pageItem.id! } as any,
variables: { id: pageItem.id! },
config,
preview,
}))

View File

@@ -73,10 +73,8 @@ export default function Search({
const { data } = useSearch({
search: typeof q === 'string' ? q : '',
// TODO: Shopify - Fix this type
categoryId: activeCategory?.entityId as any,
// TODO: Shopify - Fix this type
brandId: (activeBrand as any)?.entityId,
categoryId: activeCategory?.entityId,
brandId: activeBrand?.entityId,
sort: typeof sort === 'string' ? sort : '',
})