Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preparing to V% custom app [V% products, other localisations] #1

Merged
merged 4 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions composable-ui/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
public/sitemap*
public/robots.txt

.env*.local
17 changes: 17 additions & 0 deletions composable-ui/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,23 @@ module.exports = () => {
'voucherify-uploads.s3.amazonaws.com',
'voucherify.io',
'dev.dl.voucherify.io',
'www.drinksupermarket.com',
'www.nestlepurezavital.com.ar',
'www.benjerry.com',
'a.allegroimg.com',
'i5.walmartimages.com',
'www.teyli.eu',
'basketo.pl',
'asset1.cxnmarksandspencer.com',
'japoniacentralna.pl',
'content.woolovers.com',
'encrypted-tbn0.gstatic.com',
'm.media-amazon.com',
'i.insider.com',
'lsco.scene7.com',
'media.boohoo.com',
'pl.benetton.com',
'eu.wrangler.com',
],
formats: ['image/avif', 'image/webp'],
minimumCacheTTL: 60 * 60 * 24 * 30,
Expand Down
9 changes: 2 additions & 7 deletions composable-ui/src/components/cart/__data__/cart-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,13 @@ export const cartData: CartData = {
{
id: '1',
category: 'Accessories',
type: 'Bag',
name: 'Venture Daypack',
brand: 'Riley',
price: 129,
tax: 0.07,
image: {
url: '/img/products/_0000s_0001_backpack-rugged-black-front.jpg',
alt: '',
},
sku: 'SKU-A1-2345',
slug: 'venture-daypack',
image_url: '/img/products/_0000s_0001_backpack-rugged-black-front.jpg',
quantity: 1,
slug: 'venture-daypack',
},
],
summary: {
Expand Down
13 changes: 8 additions & 5 deletions composable-ui/src/components/cart/cart-drawer/cart-drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,18 @@ export const CartDrawer = () => {
columns={4}
editable
details={[
{ name: 'SKU', value: item.sku, id: item.id },
{ name: 'Type', value: item.type, id: item.id },
{
name: 'Category',
value: item.category,
id: item.id,
},
]}
size={'sm'}
image={{
src: item.image.url,
alt: item.image.alt ?? item.name,
src: item.image_url || '',
alt: item.name || '',
onClickImage: () =>
router.push(`/product/${item.slug}`),
router.push(`/product/${item.slug}?id=${item.id}`),
}}
name={item.name || ''}
labels={{
Expand Down
9 changes: 3 additions & 6 deletions composable-ui/src/components/cart/cart-item-data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const CartItemData = ({ cartItem }: CartItemDataProps) => {
<Stack direction="row" spacing={{ base: '3', md: '5' }} flexGrow={1}>
<Link
as={NextLink}
href={`/product/${cartItem.slug}`}
href={`/product/${cartItem.slug}?id=${cartItem.id}`}
display="flex"
rounded="base"
>
Expand All @@ -28,8 +28,8 @@ export const CartItemData = ({ cartItem }: CartItemDataProps) => {
>
<Image
fit="cover"
src={cartItem.image.url || APP_CONFIG.IMAGE_PLACEHOLDER}
alt={cartItem.image.alt}
src={cartItem.image_url || APP_CONFIG.IMAGE_PLACEHOLDER}
alt={cartItem.name || ''}
draggable="false"
loading="lazy"
width="full"
Expand All @@ -40,9 +40,6 @@ export const CartItemData = ({ cartItem }: CartItemDataProps) => {
<Box maxWidth="calc(100% - 130px)">
<Stack fontSize="sm" align="flex-start">
<Text fontWeight="semibold">{cartItem.name}</Text>
<Text color="text-muted">
{intl.formatMessage({ id: 'product.sku' }, { sku: cartItem.sku })}
</Text>
</Stack>
</Box>
</Stack>
Expand Down
13 changes: 8 additions & 5 deletions composable-ui/src/components/cart/cart-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,18 @@ export const CartPage = () => {
columns={4}
editable
details={[
{ name: 'SKU', value: item.sku, id: item.id },
{ name: 'Type', value: item.type, id: item.id },
{
name: 'Category',
value: item.category,
id: item.id,
},
]}
size={productCartSize}
image={{
src: item.image.url,
alt: item.image.alt ?? item.name,
src: item.image_url || '',
alt: item.name || '',
onClickImage: () =>
router.push(`/product/${item.slug}`),
router.push(`/product/${item.slug}?&id=${item.id}`),
}}
metaText={
productCartSize === 'lg'
Expand Down
9 changes: 5 additions & 4 deletions composable-ui/src/components/checkout/products-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ export const ProductsList = ({
key={`${item.name}-${item.id}`}
columns={2}
size="lg"
name={item.name}
name={item.name || item.id}
brand={item.brand}
quantity={item.quantity}
image={{
src: item.image.url,
alt: item.image.alt ?? item.name,
onClickImage: () => router.push(`/product/${item.slug}`),
src: item.image_url || '',
alt: item.name || '',
onClickImage: () =>
router.push(`/product/${item.slug}?id=${item.id}`),
}}
regularPrice={intl.formatNumber(item.price, currencyFormatConfig)}
labels={{
Expand Down
227 changes: 0 additions & 227 deletions composable-ui/src/components/ev-kiosk-and-pomp-page.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions composable-ui/src/components/layout/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ export const Header = () => {
height: 'full',
}}
/>
<MenuItem
{/* <MenuItem
label="Ev Kiosk & Pump"
href={`/ev-kiosk-and-pomp`}
state={'/ev-kiosk-and-pomp' === pathname ? 'Active' : 'Default'}
rootProps={{
height: 'full',
}}
/>
/> */}
<MenuItem
label="Return Products"
href={`/return-products`}
Expand Down
Loading
Loading