From 1c0d1682731dc7e43bf805c03b0d7f8ef2e621b0 Mon Sep 17 00:00:00 2001 From: Ludovic Levalleux Date: Wed, 13 Mar 2024 18:12:05 +0000 Subject: [PATCH] fix: commit widget is not loading (#679) --- .../modal/components/Commit/CommitNonModal.tsx | 2 +- .../src/components/widgets/commit/CommitWidget.tsx | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/react-kit/src/components/modal/components/Commit/CommitNonModal.tsx b/packages/react-kit/src/components/modal/components/Commit/CommitNonModal.tsx index 97e16beda..5fedef24b 100644 --- a/packages/react-kit/src/components/modal/components/Commit/CommitNonModal.tsx +++ b/packages/react-kit/src/components/modal/components/Commit/CommitNonModal.tsx @@ -34,7 +34,7 @@ export type CommitNonModalProps = Pick< OfferVariantViewProps, "onClickBuyOrSwap" | "onAlreadyOwnOfferClick" > & { - variants: VariantV1[] | undefined; + variants?: VariantV1[]; showBosonLogo?: boolean; defaultSelectedOfferId?: string; disableVariationsSelects?: boolean; diff --git a/packages/react-kit/src/components/widgets/commit/CommitWidget.tsx b/packages/react-kit/src/components/widgets/commit/CommitWidget.tsx index a38aa3106..0038e7b0f 100644 --- a/packages/react-kit/src/components/widgets/commit/CommitWidget.tsx +++ b/packages/react-kit/src/components/widgets/commit/CommitWidget.tsx @@ -27,11 +27,10 @@ type CommitProps = { sellerId: string; bundleUuid: string; } - ) & - ( - | { lookAndFeel: "regular" } - | { lookAndFeel: "modal"; modalMargin?: CSSProperties["margin"] } - ); + ) & { + lookAndFeel: "regular" | "modal"; + modalMargin?: CSSProperties["margin"]; + }; export type CommitWidgetProps = CommitProps & CommitWidgetProvidersProps; export function CommitWidget(props: CommitWidgetProps) { const Container = useCallback(