diff --git a/.changeset/four-cups-double.md b/.changeset/four-cups-double.md new file mode 100644 index 000000000..5da959c1d --- /dev/null +++ b/.changeset/four-cups-double.md @@ -0,0 +1,5 @@ +--- +"@bigcommerce/catalyst-core": patch +--- + +Modify Cart page layout to fix mobile rendering issues. diff --git a/core/app/[locale]/(default)/cart/_components/cart-item.tsx b/core/app/[locale]/(default)/cart/_components/cart-item.tsx index 0c22a7a87..bba9e96a1 100644 --- a/core/app/[locale]/(default)/cart/_components/cart-item.tsx +++ b/core/app/[locale]/(default)/cart/_components/cart-item.tsx @@ -133,92 +133,104 @@ export const CartItem = async ({ currencyCode, product }: Props) => { return (
  • -
    -
    - +
    +
    +

    {product.brand}

    -

    {product.name}

    - - {product.selectedOptions.length > 0 && ( -
    - {product.selectedOptions.map((selectedOption) => { - switch (selectedOption.__typename) { - case 'CartSelectedMultipleChoiceOption': - return ( -
    - {selectedOption.name}:{' '} - {selectedOption.value} -
    - ); - - case 'CartSelectedCheckboxOption': - return ( -
    - {selectedOption.name}:{' '} - {selectedOption.value} -
    - ); - - case 'CartSelectedNumberFieldOption': - return ( -
    - {selectedOption.name}:{' '} - {selectedOption.number} -
    - ); - - case 'CartSelectedMultiLineTextFieldOption': - return ( -
    - {selectedOption.name}:{' '} - {selectedOption.text} -
    - ); - - case 'CartSelectedTextFieldOption': - return ( -
    - {selectedOption.name}:{' '} - {selectedOption.text} -
    - ); - - case 'CartSelectedDateFieldOption': - return ( -
    - {selectedOption.name}:{' '} - - {format.dateTime(new Date(selectedOption.date.utc))} - -
    - ); - } - - return null; - })} +
    +
    +

    {product.name}

    + + {product.selectedOptions.length > 0 && ( +
    + {product.selectedOptions.map((selectedOption) => { + switch (selectedOption.__typename) { + case 'CartSelectedMultipleChoiceOption': + return ( +
    + {selectedOption.name}:{' '} + {selectedOption.value} +
    + ); + + case 'CartSelectedCheckboxOption': + return ( +
    + {selectedOption.name}:{' '} + {selectedOption.value} +
    + ); + + case 'CartSelectedNumberFieldOption': + return ( +
    + {selectedOption.name}:{' '} + {selectedOption.number} +
    + ); + + case 'CartSelectedMultiLineTextFieldOption': + return ( +
    + {selectedOption.name}:{' '} + {selectedOption.text} +
    + ); + + case 'CartSelectedTextFieldOption': + return ( +
    + {selectedOption.name}:{' '} + {selectedOption.text} +
    + ); + + case 'CartSelectedDateFieldOption': + return ( +
    + {selectedOption.name}:{' '} + + {format.dateTime(new Date(selectedOption.date.utc))} + +
    + ); + } + + return null; + })} +
    + )} + +
    + + + +
    - )} -
    - - - - -
    -

    - {format.number(product.extendedSalePrice.value, { - style: 'currency', - currency: currencyCode, - })} -

    -
    +
    +

    + {format.number(product.extendedSalePrice.value, { + style: 'currency', + currency: currencyCode, + })} +

    + + + + +
    +
    - - - +
    + + + +
    +
  • ); diff --git a/core/app/[locale]/(default)/cart/_components/item-quantity/index.tsx b/core/app/[locale]/(default)/cart/_components/item-quantity/index.tsx index 4b61cf3b4..12277501f 100644 --- a/core/app/[locale]/(default)/cart/_components/item-quantity/index.tsx +++ b/core/app/[locale]/(default)/cart/_components/item-quantity/index.tsx @@ -135,7 +135,7 @@ const Quantity = ({ value }: { value: number }) => { const t = useTranslations('Cart.SubmitItemQuantity'); return ( - + {pending ? ( <>