From 30ece0e80bde466405b889ddad0e54672870805c Mon Sep 17 00:00:00 2001 From: Albert Folch Date: Thu, 16 Jan 2025 18:18:38 +0100 Subject: [PATCH] wip --- .../ContractualAgreementView/ContractualAgreementView.tsx | 3 ++- .../Commit/LicenseAgreementView/LicenseAgreementView.tsx | 3 ++- .../OfferFullDescriptionView/OfferFullDescriptionView.tsx | 3 ++- .../Commit/OfferPolicyView/CommitOfferPolicyView.tsx | 3 ++- .../components/modal/components/Commit/OfferVariantView.tsx | 3 ++- .../modal/components/Redeem/Confirmation/ConfirmationView.tsx | 4 +++- .../ContractualAgreementView/ContractualAgreementView.tsx | 1 + .../ExchangeFullDescriptionView.tsx | 1 + .../modal/components/Redeem/ExchangeView/ExchangeView.tsx | 1 + .../modal/components/Redeem/ExchangeView/RedeemSuccess.tsx | 1 + .../Redeem/ExchangeView/cancellation/CancellationView.tsx | 1 + .../Redeem/ExchangeView/expireVoucher/ExpireVoucherView.tsx | 1 + .../Redeem/LicenseAgreementView/LicenseAgreementView.tsx | 1 + .../components/modal/components/Redeem/MyItems/MyItems.tsx | 1 + .../Redeem/OfferPolicyView/RedeemOfferPolicyView.tsx | 1 + .../modal/components/Redeem/RedeemForm/RedeemFormView.tsx | 1 + .../modal/components/common/StepsOverview/StepsOverview.tsx | 1 + packages/react-kit/src/components/modal/nonModal/NonModal.tsx | 2 +- 18 files changed, 25 insertions(+), 7 deletions(-) diff --git a/packages/react-kit/src/components/modal/components/Commit/ContractualAgreementView/ContractualAgreementView.tsx b/packages/react-kit/src/components/modal/components/Commit/ContractualAgreementView/ContractualAgreementView.tsx index d451517a8..f1e2dac55 100644 --- a/packages/react-kit/src/components/modal/components/Commit/ContractualAgreementView/ContractualAgreementView.tsx +++ b/packages/react-kit/src/components/modal/components/Commit/ContractualAgreementView/ContractualAgreementView.tsx @@ -30,7 +30,8 @@ export function ContractualAgreementView({ ), contentStyle: { background: getCssVar("--background-accent-color") - } + }, + footerComponent: null } }); }, [dispatch, onBackClick, showBosonLogoInHeader]); diff --git a/packages/react-kit/src/components/modal/components/Commit/LicenseAgreementView/LicenseAgreementView.tsx b/packages/react-kit/src/components/modal/components/Commit/LicenseAgreementView/LicenseAgreementView.tsx index ff2a7ee98..74e2f0e2d 100644 --- a/packages/react-kit/src/components/modal/components/Commit/LicenseAgreementView/LicenseAgreementView.tsx +++ b/packages/react-kit/src/components/modal/components/Commit/LicenseAgreementView/LicenseAgreementView.tsx @@ -29,7 +29,8 @@ export function LicenseAgreementView({ ), contentStyle: { background: getCssVar("--background-accent-color") - } + }, + footerComponent: null } }); }, [dispatch, showBosonLogoInHeader, onBackClick]); diff --git a/packages/react-kit/src/components/modal/components/Commit/OfferFullDescriptionView/OfferFullDescriptionView.tsx b/packages/react-kit/src/components/modal/components/Commit/OfferFullDescriptionView/OfferFullDescriptionView.tsx index dd4f8505c..927d17441 100644 --- a/packages/react-kit/src/components/modal/components/Commit/OfferFullDescriptionView/OfferFullDescriptionView.tsx +++ b/packages/react-kit/src/components/modal/components/Commit/OfferFullDescriptionView/OfferFullDescriptionView.tsx @@ -34,7 +34,8 @@ export function OfferFullDescriptionView({ contentStyle: { background: getCssVar("--background-accent-color"), padding: 0 - } + }, + footerComponent: null } }); }, [ diff --git a/packages/react-kit/src/components/modal/components/Commit/OfferPolicyView/CommitOfferPolicyView.tsx b/packages/react-kit/src/components/modal/components/Commit/OfferPolicyView/CommitOfferPolicyView.tsx index dd8e1b4e6..92d6876f5 100644 --- a/packages/react-kit/src/components/modal/components/Commit/OfferPolicyView/CommitOfferPolicyView.tsx +++ b/packages/react-kit/src/components/modal/components/Commit/OfferPolicyView/CommitOfferPolicyView.tsx @@ -36,7 +36,8 @@ export function CommitOfferPolicyView({ ), contentStyle: { background: getCssVar("--background-accent-color") - } + }, + footerComponent: null } }); }, [ diff --git a/packages/react-kit/src/components/modal/components/Commit/OfferVariantView.tsx b/packages/react-kit/src/components/modal/components/Commit/OfferVariantView.tsx index c90c1b984..3a0614c21 100644 --- a/packages/react-kit/src/components/modal/components/Commit/OfferVariantView.tsx +++ b/packages/react-kit/src/components/modal/components/Commit/OfferVariantView.tsx @@ -124,7 +124,8 @@ export function OfferVariantView({ ), contentStyle: { background: getCssVar("--background-accent-color") - } + }, + footerComponent: null } }); }, [ diff --git a/packages/react-kit/src/components/modal/components/Redeem/Confirmation/ConfirmationView.tsx b/packages/react-kit/src/components/modal/components/Redeem/Confirmation/ConfirmationView.tsx index 8a8d4e569..8b21bb440 100644 --- a/packages/react-kit/src/components/modal/components/Redeem/Confirmation/ConfirmationView.tsx +++ b/packages/react-kit/src/components/modal/components/Redeem/Confirmation/ConfirmationView.tsx @@ -36,10 +36,12 @@ export function ConfirmationView({ useEffect(() => { dispatch({ payload: { + onArrowLeftClick: null, headerComponent: RedeemHeader, contentStyle: { background: getCssVar("--background-accent-color") - } + }, + footerComponent: null } }); }, [dispatch]); diff --git a/packages/react-kit/src/components/modal/components/Redeem/ContractualAgreementView/ContractualAgreementView.tsx b/packages/react-kit/src/components/modal/components/Redeem/ContractualAgreementView/ContractualAgreementView.tsx index bf9cfad54..2c5f0f681 100644 --- a/packages/react-kit/src/components/modal/components/Redeem/ContractualAgreementView/ContractualAgreementView.tsx +++ b/packages/react-kit/src/components/modal/components/Redeem/ContractualAgreementView/ContractualAgreementView.tsx @@ -24,6 +24,7 @@ export function ContractualAgreementView({ useEffect(() => { dispatch({ payload: { + onArrowLeftClick: null, headerComponent: ( { dispatch({ payload: { + onArrowLeftClick: null, headerComponent: ( { dispatch({ payload: { + onArrowLeftClick: null, headerComponent: ( { dispatch({ payload: { + onArrowLeftClick: null, headerComponent: ( = ({ useEffect(() => { dispatch({ payload: { + onArrowLeftClick: null, headerComponent: isCancelModeOnly ? ( diff --git a/packages/react-kit/src/components/modal/components/Redeem/ExchangeView/expireVoucher/ExpireVoucherView.tsx b/packages/react-kit/src/components/modal/components/Redeem/ExchangeView/expireVoucher/ExpireVoucherView.tsx index 8443bf850..ae107368f 100644 --- a/packages/react-kit/src/components/modal/components/Redeem/ExchangeView/expireVoucher/ExpireVoucherView.tsx +++ b/packages/react-kit/src/components/modal/components/Redeem/ExchangeView/expireVoucher/ExpireVoucherView.tsx @@ -24,6 +24,7 @@ export const ExpireVoucherView: React.FC = ({ useEffect(() => { dispatch({ payload: { + onArrowLeftClick: null, headerComponent: ( { dispatch({ payload: { + onArrowLeftClick: null, headerComponent: ( { dispatch({ payload: { + onArrowLeftClick: null, headerComponent: (

Manage your exchanges

), diff --git a/packages/react-kit/src/components/modal/components/Redeem/OfferPolicyView/RedeemOfferPolicyView.tsx b/packages/react-kit/src/components/modal/components/Redeem/OfferPolicyView/RedeemOfferPolicyView.tsx index 23e17fd0c..a02e0ccf9 100644 --- a/packages/react-kit/src/components/modal/components/Redeem/OfferPolicyView/RedeemOfferPolicyView.tsx +++ b/packages/react-kit/src/components/modal/components/Redeem/OfferPolicyView/RedeemOfferPolicyView.tsx @@ -30,6 +30,7 @@ export function RedeemOfferPolicyView({ useEffect(() => { dispatch({ payload: { + onArrowLeftClick: null, headerComponent: ( { dispatch({ payload: { + onArrowLeftClick: null, headerComponent: RedeemHeader, contentStyle: { background: getCssVar("--background-accent-color") diff --git a/packages/react-kit/src/components/modal/components/common/StepsOverview/StepsOverview.tsx b/packages/react-kit/src/components/modal/components/common/StepsOverview/StepsOverview.tsx index 6328b5b09..91f90b6a5 100644 --- a/packages/react-kit/src/components/modal/components/common/StepsOverview/StepsOverview.tsx +++ b/packages/react-kit/src/components/modal/components/common/StepsOverview/StepsOverview.tsx @@ -54,6 +54,7 @@ export default function StepsOverview({ useEffect(() => { dispatch({ payload: { + onArrowLeftClick: null, headerComponent: RedeemHeader, contentStyle: { background: getCssVar("--background-accent-color") diff --git a/packages/react-kit/src/components/modal/nonModal/NonModal.tsx b/packages/react-kit/src/components/modal/nonModal/NonModal.tsx index 630c674c7..61614c2b9 100644 --- a/packages/react-kit/src/components/modal/nonModal/NonModal.tsx +++ b/packages/react-kit/src/components/modal/nonModal/NonModal.tsx @@ -154,7 +154,7 @@ export enum ActionKind { } type Action = { - payload: State; + payload: Required; }; type State = Pick<