Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

Commit

Permalink
fix checkout address view (#909) (#910)
Browse files Browse the repository at this point in the history
* fix checkout address view

* CHANGELOG.md changed

Co-authored-by: “Konstantinos <“kostas.christomanos@gmail.com”>

Co-authored-by: Konstantinos Christomanos <42765075+konstantinoschristomanos@users.noreply.github.com>
Co-authored-by: “Konstantinos <“kostas.christomanos@gmail.com”>
  • Loading branch information
3 people authored Sep 28, 2020
1 parent 1b023c8 commit 467e319
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Require payment recreate when payment price is wrong - #892 by @orzechdev
- Handle JWT token refreshing and verifying - #883 by @orzechdev
- Fix cart sidebar style - #897 by @orzechdev
- Fix checkout address view - #909 by @konstantinoschristomanos

## 2.10.4

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ const CheckoutAddress: React.FC<IProps> = ({
checkoutBillingAddress,
billingAsShippingAddress = false,
email,
selectedUserAddressId,
selectedUserShippingAddressId,
selectedUserBillingAddressId,
userAddresses,
countries,
userId,
Expand Down Expand Up @@ -49,7 +50,7 @@ const CheckoutAddress: React.FC<IProps> = ({
formId={shippingFormId}
formRef={shippingFormRef}
addresses={userAddresses}
selectedAddressId={selectedUserAddressId}
selectedAddressId={selectedUserShippingAddressId}
countriesOptions={countries?.filter(filterNotEmptyArrayItems)}
userId={userId}
errors={shippingErrors}
Expand Down Expand Up @@ -104,7 +105,7 @@ const CheckoutAddress: React.FC<IProps> = ({
formId={billingFormId}
formRef={billingFormRef}
addresses={userAddresses}
selectedAddressId={selectedUserAddressId}
selectedAddressId={selectedUserBillingAddressId}
countriesOptions={countries?.filter(filterNotEmptyArrayItems)}
userId={userId}
errors={billingErrors}
Expand Down
3 changes: 2 additions & 1 deletion src/@next/components/organisms/CheckoutAddress/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ export declare type Address = {

export interface IProps {
userAddresses?: Address[] | null;
selectedUserAddressId?: string;
selectedUserShippingAddressId?: string;
selectedUserBillingAddressId?: string;
checkoutShippingAddress?: IAddress | null;
billingAsShippingAddress?: boolean;
checkoutBillingAddress?: IAddress | null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const CheckoutAddressSubpageWithRef: RefForwardingComponent<
const {
checkout,
selectedShippingAddressId,
selectedBillingAddressId,
billingAsShipping,
setShippingAddress,
setBillingAddress,
Expand Down Expand Up @@ -227,7 +228,8 @@ const CheckoutAddressSubpageWithRef: RefForwardingComponent<
billingAsShippingAddress={billingAsShippingState}
email={checkout?.email}
userAddresses={userAdresses}
selectedUserAddressId={selectedShippingAddressId}
selectedUserShippingAddressId={selectedShippingAddressId}
selectedUserBillingAddressId={selectedBillingAddressId}
countries={countries}
userId={user?.id}
newAddressFormId={checkoutNewAddressFormId}
Expand Down

0 comments on commit 467e319

Please sign in to comment.