@mychoice/mychoice-sdk-modules 2.1.18 → 2.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +4 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +4 -5
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -3
package/dist/esm/index.js
CHANGED
|
@@ -145,7 +145,7 @@ const OfferSection = ({ offerCompany, brokerCompany, offerPrice, phoneNumber, is
|
|
|
145
145
|
const isTheBig = appType === AppTypes.TheBig;
|
|
146
146
|
const mychoiceCls = appType === AppTypes.MyChoice ? 'mychoice' : '';
|
|
147
147
|
const { weekdayHours, saturdayHours, sundayHours } = operationHours;
|
|
148
|
-
const [detailsIsOpen, setDetailsIsOpenIsOpen] = useState(false);
|
|
148
|
+
const [detailsIsOpen, setDetailsIsOpenIsOpen] = useState(isBestOffer ?? false);
|
|
149
149
|
const handleDropdownClick = () => {
|
|
150
150
|
setDetailsIsOpenIsOpen(!detailsIsOpen);
|
|
151
151
|
};
|
|
@@ -245,9 +245,7 @@ jsx("video", { src: "https://mychoice.ca/wp-content/uploads/2023/05/Pig-Video.mp
|
|
|
245
245
|
const LoaderPrimary = () => {
|
|
246
246
|
const { appLoaderState } = useStoreAppLoader();
|
|
247
247
|
const { appConfigState } = useStoreAppConfig();
|
|
248
|
-
console.log(window.location.pathname);
|
|
249
248
|
const isLastPage = window.location.pathname.includes('discount') || window.location.pathname.includes('applicant');
|
|
250
|
-
console.log(isLastPage);
|
|
251
249
|
return (jsxs("div", { className: "loader-wrapper", children: [appConfigState.appType === AppTypes.TheBig || !isLastPage ? jsx(IconLoaderPrimary, {}) : jsx(LoaderVid, {}), !!appLoaderState.description && (jsx("h4", { children: appLoaderState.description.split('\n').map((line, index) => (jsxs("div", { children: [line, jsx("br", {})] }, index))) }))] }));
|
|
252
250
|
};
|
|
253
251
|
|
|
@@ -4007,6 +4005,7 @@ const RedirectWithSearchParams = ({ to, path }) => {
|
|
|
4007
4005
|
const { dispatchDiscountState: dispatchHomeDiscountState } = useStoreFormHomeDiscount();
|
|
4008
4006
|
const { dispatchApplicantState: dispatchLifeApplicantState } = useStoreFormLifeApplicant();
|
|
4009
4007
|
const queryRoot = useLocation().search.split('?');
|
|
4008
|
+
const toBasePath = to?.split('/')?.slice(-1)?.[0];
|
|
4010
4009
|
useEffectOnce(() => {
|
|
4011
4010
|
if (queryRoot.length > 1) {
|
|
4012
4011
|
const query = JSON.parse(`{"${decodeURI(queryRoot[1]).replace(/"/g, '\\"').replace(/&/g, '","').replace(/=/g, '":"')}"}`);
|
|
@@ -4033,7 +4032,7 @@ const RedirectWithSearchParams = ({ to, path }) => {
|
|
|
4033
4032
|
payload: { utmCampaign: query.utm_campaign },
|
|
4034
4033
|
});
|
|
4035
4034
|
}
|
|
4036
|
-
if (path === 'broker') {
|
|
4035
|
+
if (path === 'broker' || toBasePath === 'car') {
|
|
4037
4036
|
dispatchCarDiscountState({
|
|
4038
4037
|
type: StoreFormCarDiscountActionTypes.FormCarDiscountQuoterBrokerInfoSet,
|
|
4039
4038
|
payload: query,
|
|
@@ -4053,7 +4052,7 @@ const RedirectWithSearchParams = ({ to, path }) => {
|
|
|
4053
4052
|
payload: { utmCampaign: query.utm_campaign },
|
|
4054
4053
|
});
|
|
4055
4054
|
}
|
|
4056
|
-
if (path === 'broker') {
|
|
4055
|
+
if (path === 'broker' || ['home', 'condo', 'tenant'].includes(toBasePath)) {
|
|
4057
4056
|
dispatchHomeDiscountState({
|
|
4058
4057
|
type: StoreFormHomeDiscountActionTypes.FormHomeQuoterBrokerInfoSet,
|
|
4059
4058
|
payload: query,
|