mirror of
https://github.com/vercel/commerce.git
synced 2025-05-16 22:46:58 +00:00
Merge branch 'main' into update-image
This commit is contained in:
commit
e52f139a54
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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 {
|
||||
|
@ -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>
|
||||
|
@ -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,
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
|
12
turbo.json
12
turbo.json
@ -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/**"]
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user