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 req NextApiRequest
* @param path string * @param path string
*/ */
export const transformRequest = (req: NextApiRequest, path: string) => { export const transformRequest = (req: NextApiRequest) => {
const headers = new Headers() const headers = new Headers()
let body 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 const { status, errors, data, redirectTo, headers } = output
setHeaders(res, headers) setHeaders(res, headers)

View File

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

View File

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

View File

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

View File

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