@mychoice/mychoice-sdk-modules 2.1.18 → 2.1.20

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.
Files changed (27) hide show
  1. package/dist/cjs/index.js +12 -7
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/init/StoryAppWrapper/StoryAppWrapper.d.ts +1 -1
  4. package/dist/cjs/init/StoryAppWrapper/interfaces.d.ts +1 -1
  5. package/dist/cjs/insurances/car/pages/{quote/PageAllQuotes.d.ts → three-point-five/BestOfferFirst.d.ts} +1 -1
  6. package/dist/cjs/insurances/car/pages/three-point-five/index.d.ts +1 -0
  7. package/dist/cjs/insurances/car/pages/three-point-five/sections/OfferSectionCopy.d.ts +3 -0
  8. package/dist/cjs/insurances/car/pages/three-point-five/sections/OfferSectionDupe.d.ts +3 -0
  9. package/dist/cjs/insurances/car/pages/three-point-five/sections/index.d.ts +1 -0
  10. package/dist/esm/index.js +12 -7
  11. package/dist/esm/index.js.map +1 -1
  12. package/dist/esm/init/StoryAppWrapper/StoryAppWrapper.d.ts +1 -1
  13. package/dist/esm/init/StoryAppWrapper/interfaces.d.ts +1 -1
  14. package/dist/esm/insurances/car/pages/{quote/PageAllQuotes.d.ts → three-point-five/BestOfferFirst.d.ts} +1 -1
  15. package/dist/esm/insurances/car/pages/three-point-five/index.d.ts +1 -0
  16. package/dist/esm/insurances/car/pages/three-point-five/sections/OfferSectionCopy.d.ts +3 -0
  17. package/dist/esm/insurances/car/pages/three-point-five/sections/OfferSectionDupe.d.ts +3 -0
  18. package/dist/esm/insurances/car/pages/three-point-five/sections/index.d.ts +1 -0
  19. package/package.json +3 -3
  20. package/dist/cjs/insurances/car/pages/quote/sections/blocks/BlockConfirmImages.d.ts +0 -1
  21. package/dist/cjs/insurances/car/pages/quote/sections/blocks/BlockQuoteStatistics.d.ts +0 -2
  22. package/dist/cjs/shared/sections/quotes/OfferSection/BestOfferSection.d.ts +0 -3
  23. package/dist/cjs/shared/sections/quotes/OfferSection/DummyOfferSection.d.ts +0 -3
  24. package/dist/esm/insurances/car/pages/quote/sections/blocks/BlockConfirmImages.d.ts +0 -1
  25. package/dist/esm/insurances/car/pages/quote/sections/blocks/BlockQuoteStatistics.d.ts +0 -2
  26. package/dist/esm/shared/sections/quotes/OfferSection/BestOfferSection.d.ts +0 -3
  27. package/dist/esm/shared/sections/quotes/OfferSection/DummyOfferSection.d.ts +0 -3
package/dist/cjs/index.js CHANGED
@@ -155,7 +155,7 @@ const OfferSection = ({ offerCompany, brokerCompany, offerPrice, phoneNumber, is
155
155
  const isTheBig = appType === mychoiceSdkComponents.AppTypes.TheBig;
156
156
  const mychoiceCls = appType === mychoiceSdkComponents.AppTypes.MyChoice ? 'mychoice' : '';
157
157
  const { weekdayHours, saturdayHours, sundayHours } = operationHours;
158
- const [detailsIsOpen, setDetailsIsOpenIsOpen] = React.useState(false);
158
+ const [detailsIsOpen, setDetailsIsOpenIsOpen] = React.useState(isBestOffer ?? false);
159
159
  const handleDropdownClick = () => {
160
160
  setDetailsIsOpenIsOpen(!detailsIsOpen);
161
161
  };
@@ -255,9 +255,7 @@ jsxRuntime.jsx("video", { src: "https://mychoice.ca/wp-content/uploads/2023/05/P
255
255
  const LoaderPrimary = () => {
256
256
  const { appLoaderState } = mychoiceSdkStore.useStoreAppLoader();
257
257
  const { appConfigState } = mychoiceSdkStore.useStoreAppConfig();
258
- console.log(window.location.pathname);
259
- const isLastPage = window.location.pathname.includes('discount') || window.location.pathname.includes('applicant');
260
- console.log(isLastPage);
258
+ const isLastPage = window.location.pathname.includes('discount') || window.location.pathname.includes('/life/applicant');
261
259
  return (jsxRuntime.jsxs("div", { className: "loader-wrapper", children: [appConfigState.appType === mychoiceSdkComponents.AppTypes.TheBig || !isLastPage ? jsxRuntime.jsx(mychoiceSdkComponents.IconLoaderPrimary, {}) : jsxRuntime.jsx(LoaderVid, {}), !!appLoaderState.description && (jsxRuntime.jsx("h4", { children: appLoaderState.description.split('\n').map((line, index) => (jsxRuntime.jsxs("div", { children: [line, jsxRuntime.jsx("br", {})] }, index))) }))] }));
262
260
  };
263
261
 
@@ -1844,11 +1842,13 @@ const PageCarQuote = () => {
1844
1842
  const { postRequestQuote } = mychoiceSdkStore.CarQuoteDataHandler();
1845
1843
  const { appLoaderState } = mychoiceSdkStore.useStoreAppLoader();
1846
1844
  const { appDeviceType } = mychoiceSdkStore.useStoreDeviceType();
1845
+ const { appConfigState: { localIndex, insuranceType } } = mychoiceSdkStore.useStoreAppConfig();
1847
1846
  const { items, quoteConfirm } = quoteState;
1848
1847
  const isTheBig = appType === mychoiceSdkComponents.AppTypes.TheBig;
1849
1848
  const hasConfirmStep = !!(items?.length && !isTheBig && items[0]?.confirmQuote && quoteConfirm);
1850
1849
  const quoteItems = hasConfirmStep ? items?.slice(0, 2) : items;
1851
1850
  const showContentWhileLoading = hasConfirmStep ? true : !appLoaderState.isOpen;
1851
+ const navigate = reactRouterDom.useNavigate();
1852
1852
  mychoiceSdkComponents.useEffectOnce(() => {
1853
1853
  if (!vehicleFormIsValid) {
1854
1854
  vehicleFormValidate();
@@ -1866,6 +1866,10 @@ const PageCarQuote = () => {
1866
1866
  top: 0,
1867
1867
  behavior: 'smooth',
1868
1868
  });
1869
+ if (hasConfirmStep) {
1870
+ const uniqueUrl = 'offer';
1871
+ navigate(`/${localIndex || mychoiceSdkComponents.defaultLocalIndex}/${insuranceType}/quotes/${uniqueUrl}`);
1872
+ }
1869
1873
  });
1870
1874
  return (jsxRuntime.jsx("div", { className: `quote-page-content ${hasConfirmStep ? 'confirm-step' : ''}`, children: showContentWhileLoading && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [hasConfirmStep && jsxRuntime.jsx(BlockConfirmHeading, {}), jsxRuntime.jsxs("div", { className: "form-section-container", children: [appDeviceType === mychoiceSdkComponents.DeviceTypes.Mobile && !hasConfirmStep && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: !!items?.length && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: !quoteState.showCallMessage
1871
1875
  ? (jsxRuntime.jsx("div", { className: "offer-container", children: jsxRuntime.jsx(OfferSection, { isBestOffer: true, offerCompany: items[0]?.company, brokerCompany: items[0]?.brokerProfile, offerPrice: {
@@ -4007,7 +4011,7 @@ const NestedRoutes = () => {
4007
4011
  });
4008
4012
  });
4009
4013
  return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: appConfigState.drawWrapper && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(reactRouterDom.Routes, { children: [jsxRuntime.jsx(reactRouterDom.Route, { path: "*", element: jsxRuntime.jsx(reactRouterDom.Navigate, { to: { pathname: `/${appConfigState.localIndex || mychoiceSdkComponents.defaultLocalIndex}/${insuranceType}` } }) }), insuranceType === mychoiceSdkComponents.InsuranceTypes.Car
4010
- && (jsxRuntime.jsxs(reactRouterDom.Route, { path: "car", children: [jsxRuntime.jsx(reactRouterDom.Route, { index: true, element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageVehicle, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "driver", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageDriver, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "discount", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageCarDiscount, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageCarQuote, {}) }) })) })] })), jsxRuntime.jsxs(reactRouterDom.Route, { path: "home", children: [jsxRuntime.jsx(reactRouterDom.Route, { index: true, element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Home, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageAddress, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "applicant", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Home, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageApplicant, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "property", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Home, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageProperty, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "discount", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Home, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeDiscount, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Home, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeQuote, {}) }) })) })] }), jsxRuntime.jsxs(reactRouterDom.Route, { path: "condo", children: [jsxRuntime.jsx(reactRouterDom.Route, { index: true, element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Condo, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageAddress, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "applicant", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Condo, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageApplicant, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "property", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Condo, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageProperty, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "discount", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Condo, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeDiscount, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Condo, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeQuote, {}) }) })) })] }), jsxRuntime.jsxs(reactRouterDom.Route, { path: "tenant", children: [jsxRuntime.jsx(reactRouterDom.Route, { index: true, element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Tenant, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageAddress, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "applicant", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Tenant, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageApplicant, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "property", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Tenant, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageProperty, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "discount", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Tenant, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeDiscount, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Tenant, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeQuote, {}) }) })) })] }), jsxRuntime.jsxs(reactRouterDom.Route, { path: "life", children: [jsxRuntime.jsx(reactRouterDom.Route, { index: true, element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Life, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageCoverage, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "applicant", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Life, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageLifeApplicant, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Life, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageLifeQuote, {}) }) })) })] })] }) })) }));
4014
+ && (jsxRuntime.jsxs(reactRouterDom.Route, { path: "car", children: [jsxRuntime.jsx(reactRouterDom.Route, { index: true, element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageVehicle, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "driver", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageDriver, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "discount", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageCarDiscount, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes/:uniqueUrl", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageCarQuote, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageCarQuote, {}) }) })) })] })), jsxRuntime.jsxs(reactRouterDom.Route, { path: "home", children: [jsxRuntime.jsx(reactRouterDom.Route, { index: true, element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Home, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageAddress, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "applicant", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Home, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageApplicant, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "property", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Home, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageProperty, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "discount", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Home, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeDiscount, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Home, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeQuote, {}) }) })) })] }), jsxRuntime.jsxs(reactRouterDom.Route, { path: "condo", children: [jsxRuntime.jsx(reactRouterDom.Route, { index: true, element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Condo, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageAddress, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "applicant", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Condo, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageApplicant, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "property", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Condo, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageProperty, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "discount", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Condo, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeDiscount, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Condo, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeQuote, {}) }) })) })] }), jsxRuntime.jsxs(reactRouterDom.Route, { path: "tenant", children: [jsxRuntime.jsx(reactRouterDom.Route, { index: true, element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Tenant, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageAddress, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "applicant", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Tenant, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageApplicant, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "property", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Tenant, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageProperty, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "discount", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Tenant, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeDiscount, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Tenant, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageHomeQuote, {}) }) })) })] }), jsxRuntime.jsxs(reactRouterDom.Route, { path: "life", children: [jsxRuntime.jsx(reactRouterDom.Route, { index: true, element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Life, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageCoverage, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "applicant", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Life, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageLifeApplicant, {}) }) })) }), jsxRuntime.jsx(reactRouterDom.Route, { path: "quotes", element: (jsxRuntime.jsx(AppRouteWrapper, { insuranceType: mychoiceSdkComponents.InsuranceTypes.Life, children: jsxRuntime.jsx(RouteWrapperPublic, { children: jsxRuntime.jsx(PageLifeQuote, {}) }) })) })] })] }) })) }));
4011
4015
  };
4012
4016
  const RedirectWithSearchParams = ({ to, path }) => {
4013
4017
  const insuranceType = mychoiceSdkComponents.getInsuranceType();
@@ -4017,6 +4021,7 @@ const RedirectWithSearchParams = ({ to, path }) => {
4017
4021
  const { dispatchDiscountState: dispatchHomeDiscountState } = mychoiceSdkStore.useStoreFormHomeDiscount();
4018
4022
  const { dispatchApplicantState: dispatchLifeApplicantState } = mychoiceSdkStore.useStoreFormLifeApplicant();
4019
4023
  const queryRoot = reactRouterDom.useLocation().search.split('?');
4024
+ const toBasePath = to?.split('/')?.slice(-1)?.[0];
4020
4025
  mychoiceSdkComponents.useEffectOnce(() => {
4021
4026
  if (queryRoot.length > 1) {
4022
4027
  const query = JSON.parse(`{"${decodeURI(queryRoot[1]).replace(/"/g, '\\"').replace(/&/g, '","').replace(/=/g, '":"')}"}`);
@@ -4043,7 +4048,7 @@ const RedirectWithSearchParams = ({ to, path }) => {
4043
4048
  payload: { utmCampaign: query.utm_campaign },
4044
4049
  });
4045
4050
  }
4046
- if (path === 'broker') {
4051
+ if (path === 'broker' || toBasePath === 'car') {
4047
4052
  dispatchCarDiscountState({
4048
4053
  type: mychoiceSdkStore.StoreFormCarDiscountActionTypes.FormCarDiscountQuoterBrokerInfoSet,
4049
4054
  payload: query,
@@ -4063,7 +4068,7 @@ const RedirectWithSearchParams = ({ to, path }) => {
4063
4068
  payload: { utmCampaign: query.utm_campaign },
4064
4069
  });
4065
4070
  }
4066
- if (path === 'broker') {
4071
+ if (path === 'broker' || ['home', 'condo', 'tenant'].includes(toBasePath)) {
4067
4072
  dispatchHomeDiscountState({
4068
4073
  type: mychoiceSdkStore.StoreFormHomeDiscountActionTypes.FormHomeQuoterBrokerInfoSet,
4069
4074
  payload: query,