Fix image height & missing query string

This commit is contained in:
cond0r 2023-01-26 10:35:43 +02:00
parent e66cd12f4c
commit de2e92cf3e
3 changed files with 5 additions and 4 deletions

View File

@ -44,7 +44,10 @@ export const transformRequest = (req: NextApiRequest, path: string) => {
body = JSON.stringify(req.body)
}
return new NextRequest(`https://${req.headers.host}/api/commerce/${path}`, {
// Get the url path & query string
const url = new URL(req.url || '/', `https://${req.headers.host}`)
return new NextRequest(url, {
headers,
method: req.method,
body,

View File

@ -73,7 +73,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

@ -81,8 +81,6 @@ const ProductView: FC<ProductViewProps> = ({ product, relatedProducts }) => {
className="animated fadeIn"
imgProps={{
alt: p.name,
width: 300,
height: 300,
}}
/>
</div>