Merge branch 'main' into update-image

This commit is contained in:
Catalin Pinte 2023-01-27 10:03:25 +02:00 committed by GitHub
commit e52f139a54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 16 deletions

View File

@ -28,7 +28,7 @@ export const getInput = (req: NextRequest) => req.json().catch(() => ({}))
* @param req NextApiRequest
* @param path string
*/
export const transformRequest = (req: NextApiRequest, path: string) => {
export const transformRequest = (req: NextApiRequest) => {
const headers = new Headers()
let body

View File

@ -44,7 +44,7 @@ export default function nodeHandler<P extends APIProvider>(
)
}
const output = await handlers[path](transformRequest(req, path))
const output = await handlers[path](transformRequest(req))
const { status, errors, data, redirectTo, headers } = output
setHeaders(res, headers)

View File

@ -75,7 +75,7 @@
}
.imageContainer .productImage {
@apply transform transition-transform duration-500 object-cover w-auto h-full;
@apply transform transition-transform duration-500 object-cover;
}
.root .wishlistButton {

View File

@ -29,10 +29,8 @@ const ProductView: FC<ProductViewProps> = ({ product, relatedProducts }) => {
<Text variant="sectionHeading">Related Products</Text>
<div className={s.relatedProductsGrid}>
{relatedProducts.map((p) => (
<div
key={p.path}
className="bg-accent-0 border border-accent-2 flex flex-1 h-full"
>
<div key={p.path} className="bg-accent-0 border border-accent-2">
<ProductCard
className="animated fadeIn"
noNameTag
@ -41,8 +39,7 @@ const ProductView: FC<ProductViewProps> = ({ product, relatedProducts }) => {
variant="simple"
imgProps={{
alt: p.name,
width: 300,
height: 300,
className: 'w-full h-full object-cover',
}}
/>
</div>

View File

@ -70,8 +70,8 @@ export default function Home({
product={product}
imgProps={{
alt: product.name,
width: i === 0 ? 1080 : 540,
height: i === 0 ? 1080 : 540,
width: i === 1 ? 1080 : 540,
height: i === 1 ? 1080 : 540,
}}
/>
))}

View File

@ -8,11 +8,13 @@
},
"next-commerce#build": {
"dependsOn": [
"^build",
"$COMMERCE_PROVIDER",
"$BIGCOMMERCE_STOREFRONT_API_URL",
"$NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN",
"$NEXT_PUBLIC_SWELL_STORE_ID"
"^build"
],
"env": [
"COMMERCE_PROVIDER",
"BIGCOMMERCE_STOREFRONT_API_URL",
"NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN",
"NEXT_PUBLIC_SWELL_STORE_ID"
],
"outputs": [".next/**"]
},