Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
paales committed Feb 27, 2025
1 parent 332ac3f commit adb26f4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
extendableComponent,
filterNonNullableKeys,
FullPageMessage,
iconHome,
IconSvg,
Expand All @@ -21,7 +22,9 @@ const parts = ['root', 'addresses', 'button', 'link'] as const
const { classes } = extendableComponent(name, parts)

export function AccountAddresses(props: AccountAddressesProps) {
const { addresses, loading, sx = [] } = props
const { addresses: addressesIncoming, loading, sx = [] } = props

const addresses = filterNonNullableKeys(addressesIncoming)

if (loading) {
return (
Expand Down Expand Up @@ -58,7 +61,7 @@ export function AccountAddresses(props: AccountAddressesProps) {

return (
<>
{((addresses && addresses.length === 0) || !addresses) && (
{addresses.length === 0 && (
<FullPageMessage
title={<Trans id='You have no addresses saved yet' />}
icon={<IconSvg src={iconHome} size='xxl' />}
Expand All @@ -70,13 +73,15 @@ export function AccountAddresses(props: AccountAddressesProps) {
/>
)}

{addresses && addresses.length >= 1 && (
{addresses.length >= 1 && (
<SectionContainer labelLeft={<Trans id='Shipping addresses' />}>
<Box
className={classes.addresses}
sx={(theme) => ({ '& > div': { borderBottom: `1px solid ${theme.palette.divider}` } })}
>
{addresses?.map((address) => <AccountAddress key={address?.id} {...address} />)}
{addresses.map((address) => (
<AccountAddress key={address.id} {...address} />
))}
</Box>

<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ export function OrderDetails(props: OrderDetailsProps) {
region: shipping_address.region,
region_id: shipping_address.region_id ? Number(shipping_address.region_id) : null,
}}
region_id={shipping_address.region_id ? Number(shipping_address.region_id) : null}
custom_attributesV2={[]}
// custom_attributesV2={[]}
/>
</SectionContainer>
</Box>
Expand All @@ -190,8 +189,7 @@ export function OrderDetails(props: OrderDetailsProps) {
region: billing_address.region,
region_id: billing_address.region_id ? Number(billing_address.region_id) : null,
}}
region_id={billing_address.region_id ? Number(billing_address.region_id) : null}
custom_attributesV2={[]}
// custom_attributesV2={[]}
/>
)}
</SectionContainer>
Expand Down

0 comments on commit adb26f4

Please sign in to comment.