Skip to content

Commit

Permalink
Add missing gutter to /checkout/item page
Browse files Browse the repository at this point in the history
  • Loading branch information
bramvanderholst committed Aug 19, 2024
1 parent 08f0b1a commit 4103e09
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 28 deletions.
5 changes: 5 additions & 0 deletions .changeset/sour-falcons-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphcommerce/magento-graphcms': patch
---

Add missing gutter to /checkout/item page
58 changes: 30 additions & 28 deletions examples/magento-graphcms/pages/checkout/item/[url].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
} from '@graphcommerce/next-ui'
import { i18n } from '@lingui/core'
import { Trans } from '@lingui/react'
import { CircularProgress, Typography } from '@mui/material'
import { CircularProgress, Container, Typography } from '@mui/material'
import { useRouter } from 'next/router'
import { LayoutNavigationProps, AddProductsToCartView } from '../../../components'
import { Props, getStaticProps } from '../../p/[url]'
Expand Down Expand Up @@ -65,35 +65,37 @@ function CartItemEdit(props: Props) {
</EmptyCart>
)}
{cartItem && (
<EditCartItemForm
key={cartItemId}
href='/cart'
product={product}
cartItem={cartItem}
defaultValues={defaultValues}
redirect={false}
disableSuccessSnackbar
>
<ProductPageGallery
<Container>
<EditCartItemForm
key={cartItemId}
href='/cart'
product={product}
disableZoom
disableSticky
variantMd='oneColumn'
sx={(theme) => ({
maxWidth: '500px',
mb: 0,
'& .SidebarGallery-sidebar': { display: 'grid', rowGap: theme.spacings.sm },
})}
cartItem={cartItem}
defaultValues={defaultValues}
redirect={false}
disableSuccessSnackbar
>
<Typography variant='h3' component='div' gutterBottom>
<ProductPageName product={product} />
</Typography>
<AddProductsToCartView product={product} />
</ProductPageGallery>
<OverlayStickyBottom sx={{ display: 'flex', justifyContent: 'center' }}>
<EditCartItemButton product={product} sx={(theme) => ({ my: theme.spacings.sm })} />
</OverlayStickyBottom>
</EditCartItemForm>
<ProductPageGallery
product={product}
disableZoom
disableSticky
variantMd='oneColumn'
sx={(theme) => ({
maxWidth: '500px',
mb: 0,
'& .SidebarGallery-sidebar': { display: 'grid', rowGap: theme.spacings.sm },
})}
>
<Typography variant='h3' component='div' gutterBottom>
<ProductPageName product={product} />
</Typography>
<AddProductsToCartView product={product} />
</ProductPageGallery>
<OverlayStickyBottom sx={{ display: 'flex', justifyContent: 'center' }}>
<EditCartItemButton product={product} sx={(theme) => ({ my: theme.spacings.sm })} />
</OverlayStickyBottom>
</EditCartItemForm>
</Container>
)}
</WaitForQueries>
</>
Expand Down

0 comments on commit 4103e09

Please sign in to comment.