@mychoice/mychoice-sdk-modules 2.1.34 → 2.1.36
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 +125 -131
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/init/StoryAppWrapper/StoryAppWrapper.d.ts +1 -1
- package/dist/cjs/init/StoryAppWrapper/interfaces.d.ts +1 -1
- package/dist/cjs/insurances/car/pages/{three-point-five/BestOfferFirst.d.ts → quote/PageAllQuotes.d.ts} +1 -1
- package/dist/cjs/insurances/car/pages/quote/sections/blocks/BlockConfirmImages.d.ts +1 -0
- package/dist/cjs/insurances/car/pages/quote/sections/blocks/BlockQuoteStatistics.d.ts +2 -0
- package/dist/cjs/shared/navigations/interfaces.d.ts +0 -1
- package/dist/cjs/shared/sections/quotes/OfferSection/BestOfferSection.d.ts +3 -0
- package/dist/cjs/shared/sections/quotes/OfferSection/DummyOfferSection.d.ts +3 -0
- package/dist/esm/index.js +125 -131
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/init/StoryAppWrapper/StoryAppWrapper.d.ts +1 -1
- package/dist/esm/init/StoryAppWrapper/interfaces.d.ts +1 -1
- package/dist/esm/insurances/car/pages/{three-point-five/BestOfferFirst.d.ts → quote/PageAllQuotes.d.ts} +1 -1
- package/dist/esm/insurances/car/pages/quote/sections/blocks/BlockConfirmImages.d.ts +1 -0
- package/dist/esm/insurances/car/pages/quote/sections/blocks/BlockQuoteStatistics.d.ts +2 -0
- package/dist/esm/shared/navigations/interfaces.d.ts +0 -1
- package/dist/esm/shared/sections/quotes/OfferSection/BestOfferSection.d.ts +3 -0
- package/dist/esm/shared/sections/quotes/OfferSection/DummyOfferSection.d.ts +3 -0
- package/dist/index.d.ts +0 -1
- package/package.json +3 -3
- package/dist/cjs/insurances/car/pages/three-point-five/index.d.ts +0 -1
- package/dist/cjs/insurances/car/pages/three-point-five/sections/OfferSectionCopy.d.ts +0 -3
- package/dist/cjs/insurances/car/pages/three-point-five/sections/OfferSectionDupe.d.ts +0 -3
- package/dist/cjs/insurances/car/pages/three-point-five/sections/index.d.ts +0 -1
- package/dist/esm/insurances/car/pages/three-point-five/index.d.ts +0 -1
- package/dist/esm/insurances/car/pages/three-point-five/sections/OfferSectionCopy.d.ts +0 -3
- package/dist/esm/insurances/car/pages/three-point-five/sections/OfferSectionDupe.d.ts +0 -3
- package/dist/esm/insurances/car/pages/three-point-five/sections/index.d.ts +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SdkFC } from '@groksmith/mychoice-sdk-components';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const PageAllQuotes: SdkFC;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BlockConfirmImages: () => import("react/jsx-runtime").JSX.Element;
|
package/dist/esm/index.js
CHANGED
|
@@ -1742,7 +1742,7 @@ const BlockEndorsements = () => {
|
|
|
1742
1742
|
};
|
|
1743
1743
|
|
|
1744
1744
|
const SectionQuoteRecalc$1 = () => {
|
|
1745
|
-
const { appConfigState: { appType } } = useStoreAppConfig();
|
|
1745
|
+
const { appConfigState: { appType }, } = useStoreAppConfig();
|
|
1746
1746
|
const isTheBig = appType === AppTypes.TheBig;
|
|
1747
1747
|
const mychoiceCls = appType === AppTypes.MyChoice ? 'mychoice' : '';
|
|
1748
1748
|
const { vehicleState, dispatchVehicleState } = useStoreFormCarVehicle();
|
|
@@ -3123,28 +3123,25 @@ const PageLifeQuote = () => {
|
|
|
3123
3123
|
behavior: 'smooth',
|
|
3124
3124
|
});
|
|
3125
3125
|
});
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
? (jsx("div", { className: "offer-container", children: jsx(OfferSection, { isBestOffer: true, offerCompany: items[0]?.company, brokerCompany: items[0]?.brokerProfile, offerPrice: {
|
|
3130
|
-
monthly: items[0]?.priceMonthly,
|
|
3131
|
-
yearly: items[0]?.priceYearly,
|
|
3132
|
-
}, operationHours: {
|
|
3133
|
-
saturdayHours: items[0]?.brokerProfile.hoursSaturday,
|
|
3134
|
-
sundayHours: items[0]?.brokerProfile.hoursSunday,
|
|
3135
|
-
weekdayHours: items[0]?.brokerProfile.hoursWorkdays,
|
|
3136
|
-
}, phoneNumber: formatPhoneObject(items[0]?.brokerProfile.phone), redirectUrl: items[0]?.brokerProfile.redirectUrl || '' }) }))
|
|
3137
|
-
: jsx(SplashScreen, {}) })) })), jsx(SectionQuoteEdit, {})] }), appDeviceType !== DeviceTypes.Mobile && quoteState.showCallMessage
|
|
3138
|
-
&& jsx(SplashScreen, {}), !quoteState.showCallMessage
|
|
3139
|
-
&& (jsx("div", { className: "offer-container", children: !!items?.length
|
|
3140
|
-
&& items.map(({ company, brokerProfile, priceMonthly, priceYearly, }, index) => (jsx("div", { children: (appDeviceType !== DeviceTypes.Mobile || (appDeviceType === DeviceTypes.Mobile && index !== 0)) && (jsx(OfferSection, { isBestOffer: index === 0, offerCompany: company, brokerCompany: brokerProfile, offerPrice: {
|
|
3141
|
-
monthly: priceMonthly,
|
|
3142
|
-
yearly: priceYearly,
|
|
3126
|
+
return (jsx("div", { className: "quote-page-content", children: !appLoaderState.isOpen && (jsxs(Fragment, { children: [jsxs("div", { className: "form-section-container", children: [appDeviceType === DeviceTypes.Mobile && (jsx(Fragment, { children: !!items?.length && (jsx(Fragment, { children: !quoteState.showCallMessage ? (jsx("div", { className: "offer-container", children: jsx(OfferSection, { isBestOffer: true, offerCompany: items[0]?.company, brokerCompany: items[0]?.brokerProfile, offerPrice: {
|
|
3127
|
+
monthly: items[0]?.priceMonthly,
|
|
3128
|
+
yearly: items[0]?.priceYearly,
|
|
3143
3129
|
}, operationHours: {
|
|
3144
|
-
saturdayHours: brokerProfile.hoursSaturday,
|
|
3145
|
-
sundayHours: brokerProfile.hoursSunday,
|
|
3146
|
-
weekdayHours: brokerProfile.hoursWorkdays,
|
|
3147
|
-
}, phoneNumber: formatPhoneObject(brokerProfile.phone), redirectUrl: brokerProfile.redirectUrl || '' }))
|
|
3130
|
+
saturdayHours: items[0]?.brokerProfile.hoursSaturday,
|
|
3131
|
+
sundayHours: items[0]?.brokerProfile.hoursSunday,
|
|
3132
|
+
weekdayHours: items[0]?.brokerProfile.hoursWorkdays,
|
|
3133
|
+
}, phoneNumber: formatPhoneObject(items[0]?.brokerProfile.phone), redirectUrl: items[0]?.brokerProfile.redirectUrl || '' }) })) : (jsx(SplashScreen, {})) })) })), jsx(SectionQuoteEdit, {})] }), appDeviceType !== DeviceTypes.Mobile &&
|
|
3134
|
+
quoteState.showCallMessage && jsx(SplashScreen, {}), !quoteState.showCallMessage && (jsx("div", { className: "offer-container", children: !!items?.length &&
|
|
3135
|
+
items.map(({ company, brokerProfile, priceMonthly, priceYearly, }, index) => (jsx("div", { children: (appDeviceType !== DeviceTypes.Mobile ||
|
|
3136
|
+
(appDeviceType === DeviceTypes.Mobile &&
|
|
3137
|
+
index !== 0)) && (jsx(OfferSection, { isBestOffer: index === 0, offerCompany: company, brokerCompany: brokerProfile, offerPrice: {
|
|
3138
|
+
monthly: priceMonthly,
|
|
3139
|
+
yearly: priceYearly,
|
|
3140
|
+
}, operationHours: {
|
|
3141
|
+
saturdayHours: brokerProfile.hoursSaturday,
|
|
3142
|
+
sundayHours: brokerProfile.hoursSunday,
|
|
3143
|
+
weekdayHours: brokerProfile.hoursWorkdays,
|
|
3144
|
+
}, phoneNumber: formatPhoneObject(brokerProfile.phone), redirectUrl: brokerProfile.redirectUrl || '' })) }, index))) }))] })) }));
|
|
3148
3145
|
};
|
|
3149
3146
|
|
|
3150
3147
|
const getFormattedAddress = (unitNumber, streetAddress, city, provinceCode, postalCode, country) => {
|
|
@@ -3236,9 +3233,7 @@ const ModalQuoteRequest = ({ title, description, phoneNumber, }) => (jsxs("div",
|
|
|
3236
3233
|
&& jsx("p", { children: description }), jsxs("div", { className: "modal-buttons", children: [jsx(ButtonBase, { type: ButtonTypes.Button, label: "OK", category: CategoryTypes.Filled, color: ColorTypes.Primary, variant: ButtonVariantTypes.Rectangle, size: SizeTypes.Large }), phoneNumber
|
|
3237
3234
|
&& (jsx("a", { target: "_blank", rel: "noreferrer noopener", href: `tel:1${phoneNumber}`, className: "phoneNumber", children: "Call the Broker" }))] })] }));
|
|
3238
3235
|
|
|
3239
|
-
const PostalCodeDataBox = ({ title, postalCode, className,
|
|
3240
|
-
return (jsx(Fragment, { children: jsxs("div", { id: id, className: `${className} postal-code-data-box`, children: [jsx("h2", { children: title }), postalCode && (jsxs("p", { children: ["Your postal code:", ' ', postalCode] }))] }) }));
|
|
3241
|
-
};
|
|
3236
|
+
const PostalCodeDataBox = ({ title, postalCode, className }) => (jsxs("div", { className: `${className} postal-code-data-box`, children: [jsx("h2", { children: title }), postalCode && (jsxs("p", { children: ["Your postal code:", ' ', postalCode] }))] }));
|
|
3242
3237
|
PostalCodeDataBox.defaultProps = {
|
|
3243
3238
|
title: '',
|
|
3244
3239
|
postalCode: '',
|
|
@@ -3252,21 +3247,6 @@ const StepsBox = ({ formSteps, validationHooks, propertyIsCompleted, }) => {
|
|
|
3252
3247
|
// const { dispatchAppModalState } = useStoreAppModal();
|
|
3253
3248
|
// const [steps, setSteps] = useState(formSteps);
|
|
3254
3249
|
// const [validations, setValidations] = useState(validationHooks);
|
|
3255
|
-
const [showContent, setShowContent] = useState(false);
|
|
3256
|
-
useEffect(() => {
|
|
3257
|
-
const checkTime = () => {
|
|
3258
|
-
const currentUTCDate = new Date();
|
|
3259
|
-
const currentHour = currentUTCDate.getUTCHours() - 5; // EST is UTC-5
|
|
3260
|
-
const currentDay = currentUTCDate.getUTCDay(); // Sunday is 0, Monday is 1, ..., Saturday is 6
|
|
3261
|
-
// Check if it's a weekday (Monday to Friday) and if the current hour is between 9 am and 6 pm
|
|
3262
|
-
const isWeekday = currentDay >= 1 && currentDay <= 5;
|
|
3263
|
-
const isWorkingHours = currentHour >= 9 && currentHour < 18;
|
|
3264
|
-
setShowContent(isWeekday && isWorkingHours);
|
|
3265
|
-
};
|
|
3266
|
-
checkTime(); // Initial check
|
|
3267
|
-
const interval = setInterval(checkTime, 60000); // Check every minute
|
|
3268
|
-
return () => clearInterval(interval); // Cleanup
|
|
3269
|
-
}, []); // Run effect only once on component mount
|
|
3270
3250
|
const { pathname } = useLocation();
|
|
3271
3251
|
const currentPath = pathname.split('/');
|
|
3272
3252
|
const activeStep = formSteps.find((step) => currentPath[currentPath.length - 1] === step.path?.substring(1));
|
|
@@ -3330,22 +3310,6 @@ const StepsBox = ({ formSteps, validationHooks, propertyIsCompleted, }) => {
|
|
|
3330
3310
|
}
|
|
3331
3311
|
}
|
|
3332
3312
|
};
|
|
3333
|
-
const [showQR, setShowQr] = useState(false);
|
|
3334
|
-
const containerRef = useRef(null);
|
|
3335
|
-
useEffect(() => {
|
|
3336
|
-
const handleClickOutside = (event) => {
|
|
3337
|
-
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
3338
|
-
setShowQr(false);
|
|
3339
|
-
}
|
|
3340
|
-
};
|
|
3341
|
-
document.addEventListener('mousedown', handleClickOutside);
|
|
3342
|
-
return () => {
|
|
3343
|
-
document.removeEventListener('mousedown', handleClickOutside);
|
|
3344
|
-
};
|
|
3345
|
-
}, []);
|
|
3346
|
-
const handleHelpButton = () => {
|
|
3347
|
-
setShowQr(!showQR);
|
|
3348
|
-
};
|
|
3349
3313
|
return (jsxs("ol", { className: appType === AppTypes.MyChoice ? 'mychoice-navigation-steps-container' : 'navigation-steps-container', children: [!isMobile ? (jsx(Fragment, { children: formSteps?.map((item, index) => {
|
|
3350
3314
|
let cls;
|
|
3351
3315
|
switch (true) {
|
|
@@ -3362,11 +3326,9 @@ const StepsBox = ({ formSteps, validationHooks, propertyIsCompleted, }) => {
|
|
|
3362
3326
|
return jsx(Fragment, {});
|
|
3363
3327
|
}
|
|
3364
3328
|
return (jsx("div", { role: "presentation", className: appType === AppTypes.MyChoice ? navigationCls : 'navigation-step-container', onKeyDown: handleStepClick(item, index), onClick: handleStepClick(item, index), children: appType === AppTypes.MyChoice
|
|
3365
|
-
?
|
|
3329
|
+
? jsx(MychoiceStep, { className: cls, item: item, index: index }, `${index}-${item?.title}`)
|
|
3366
3330
|
: jsx(Step, { className: cls, item: item, index: index }, `${index}-${item?.title}`) }, `${index}-${item?.title}`));
|
|
3367
|
-
}) })) : jsx(Step, { item: formSteps[activeIndex], index: activeIndex, itemsCount: formSteps.length, isMobile: true }), appType === AppTypes.MyChoice && (jsxs(Fragment, { children: [jsx("hr", {}), jsxs("div", { className: "estimated-minutes", children: [jsx(IconClock, {}), jsxs("div", { children: ["Estimated", ' ', jsxs("span", { className: "time", children: [formSteps.length - activeIndex - 1, ' ', formSteps.length - activeIndex - 1 > 1 ? 'minutes' : 'minute'] }), ' ', "to complete"] })] })
|
|
3368
|
-
e.currentTarget.style.opacity = '1';
|
|
3369
|
-
}, src: "https://www.mychoice.ca/wp-content/themes/mychoice-theme/img/svg/qr-phone-with-text.svg", alt: "QR code scan to call" }))] })] }))] }))] }));
|
|
3331
|
+
}) })) : jsx(Step, { item: formSteps[activeIndex], index: activeIndex, itemsCount: formSteps.length, isMobile: true }), appType === AppTypes.MyChoice && (jsxs(Fragment, { children: [jsx("hr", {}), jsxs("div", { className: "estimated-minutes", children: [jsx(IconClock, {}), jsxs("div", { children: ["Estimated", ' ', jsxs("span", { className: "time", children: [formSteps.length - activeIndex - 1, ' ', formSteps.length - activeIndex - 1 > 1 ? 'minutes' : 'minute'] }), ' ', "to complete"] })] })] }))] }));
|
|
3370
3332
|
};
|
|
3371
3333
|
StepsBox.defaultProps = {
|
|
3372
3334
|
partnerId: '',
|
|
@@ -3451,7 +3413,7 @@ ButtonsBox.defaultProps = {
|
|
|
3451
3413
|
activeIndex: 0,
|
|
3452
3414
|
};
|
|
3453
3415
|
|
|
3454
|
-
const NavigationTop = ({ title, postalCode, validationHooks, formSteps, clearForm, propertyIsCompleted,
|
|
3416
|
+
const NavigationTop = ({ title, postalCode, validationHooks, formSteps, clearForm, propertyIsCompleted, }) => {
|
|
3455
3417
|
const { pathname } = useLocation();
|
|
3456
3418
|
const { appConfigState: { appType, localIndex } } = useStoreAppConfig();
|
|
3457
3419
|
const isTheBig = appType === AppTypes.TheBig;
|
|
@@ -3479,8 +3441,8 @@ const NavigationTop = ({ title, postalCode, validationHooks, formSteps, clearFor
|
|
|
3479
3441
|
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
|
3480
3442
|
}
|
|
3481
3443
|
}
|
|
3482
|
-
return (jsx("div", {
|
|
3483
|
-
? (jsx(Fragment, { children: !isDesktop && (formSteps.length - activeIndex - 1) ? (jsxs("div", { className: "estimated-minutes", children: [jsx(IconClock, {}), jsxs("div", { children: [isMobile ? (jsx(
|
|
3444
|
+
return (jsx("div", { className: localIndex !== defaultLocalIndex ? 'navigation-container-partner' : 'navigation-container', children: jsxs("div", { className: `content ${appType === AppTypes.MyChoice ? 'mychoice' : ''}`, children: [jsx(PostalCodeDataBox, { className: isTheBig ? 'thebig' : '', title: title, postalCode: postalCode }), appType === AppTypes.MyChoice
|
|
3445
|
+
? (jsx(Fragment, { children: !isDesktop && (formSteps.length - activeIndex - 1) ? (jsxs("div", { className: "estimated-minutes", children: [jsx(IconClock, {}), jsxs("div", { children: [isMobile ? (jsx("div", { children: jsxs("span", { className: "time", children: [formSteps.length - activeIndex - 1, ' ', formSteps.length - activeIndex - 1 > 1 ? 'minutes' : 'minute'] }) })) : (jsx(Fragment, { children: jsxs("div", { children: ["Estimated", ' ', jsxs("span", { className: "time", children: [formSteps.length - activeIndex - 1, ' ', formSteps.length - activeIndex - 1 > 1 ? 'minutes' : 'minute'] }), ' ', "to complete"] }) })), jsx("span", { children: `Step ${activeIndex + 1}/${formSteps.length - 1}` })] })] })) : jsx("span", {}) })) : (jsx(StepsBox, { formSteps: formSteps, validationHooks: validationHooks, propertyIsCompleted: propertyIsCompleted })), jsx(ButtonsBox, { formSteps: formSteps, validationHooks: validationHooks, clearForm: clearForm, propertyIsCompleted: propertyIsCompleted })] }) }));
|
|
3484
3446
|
};
|
|
3485
3447
|
NavigationTop.defaultProps = {
|
|
3486
3448
|
isMobile: false,
|
|
@@ -3806,14 +3768,14 @@ const AppRouterListener = () => {
|
|
|
3806
3768
|
|
|
3807
3769
|
const AppRouteWrapper = (props) => {
|
|
3808
3770
|
const { children } = props;
|
|
3809
|
-
const { appConfigState: { isReady, appType, insuranceType, localIndex
|
|
3771
|
+
const { appConfigState: { isReady, appType, insuranceType, localIndex }, } = useStoreAppConfig();
|
|
3810
3772
|
const { dispatchAppModalState } = useStoreAppModal();
|
|
3811
3773
|
const { postRequestQuote: carPostRequestQuote } = CarQuoteDataHandler();
|
|
3812
3774
|
const { postRequestQuote: homePostRequestQuote } = HomeQuoteDataHandler();
|
|
3813
3775
|
const { postRequestQuote: lifePostRequestQuote } = LifeQuoteDataHandler();
|
|
3814
|
-
const { postalState: { item: { postalCode: carPostal } } } = useStoreFormCarPostal();
|
|
3815
|
-
const { postalState: { item: { postalCode: homePostal } } } = useStoreFormHomePostal();
|
|
3816
|
-
const { postalState: { item: { postalCode: lifePostal } } } = useStoreFormLifePostal();
|
|
3776
|
+
const { postalState: { item: { postalCode: carPostal }, }, } = useStoreFormCarPostal();
|
|
3777
|
+
const { postalState: { item: { postalCode: homePostal }, }, } = useStoreFormHomePostal();
|
|
3778
|
+
const { postalState: { item: { postalCode: lifePostal }, }, } = useStoreFormLifePostal();
|
|
3817
3779
|
// Car insurance states
|
|
3818
3780
|
const { vehicleState } = useStoreFormCarVehicle();
|
|
3819
3781
|
const { driverState } = useStoreFormCarDriverBase();
|
|
@@ -3839,9 +3801,9 @@ const AppRouteWrapper = (props) => {
|
|
|
3839
3801
|
const { homeDiscountFormValidate, homeDiscountFormIsValid } = useValidationHomeDiscount();
|
|
3840
3802
|
// life insurance validation
|
|
3841
3803
|
const { coverageFormValidate, coverageFormIsValid } = useValidationCoverage();
|
|
3842
|
-
const { applicantFormValidate: lifeApplicantFormValidate, applicantFormIsValid: lifeApplicantFormIsValid } = useValidationLifeApplicant();
|
|
3804
|
+
const { applicantFormValidate: lifeApplicantFormValidate, applicantFormIsValid: lifeApplicantFormIsValid, } = useValidationLifeApplicant();
|
|
3843
3805
|
let postalCode = carPostal;
|
|
3844
|
-
const { clearFormData, checkIsExpired, checkIsExpiredWithModal
|
|
3806
|
+
const { clearFormData, checkIsExpired, checkIsExpiredWithModal } = ClearFormDataHandler();
|
|
3845
3807
|
const { appLoaderState } = useStoreAppLoader();
|
|
3846
3808
|
const isMychoice = appType === AppTypes.MyChoice;
|
|
3847
3809
|
switch (insuranceType) {
|
|
@@ -3867,19 +3829,28 @@ const AppRouteWrapper = (props) => {
|
|
|
3867
3829
|
key: 0,
|
|
3868
3830
|
path: '/',
|
|
3869
3831
|
name: 'Step 1',
|
|
3870
|
-
validateOptions: {
|
|
3832
|
+
validateOptions: {
|
|
3833
|
+
validate: vehicleFormValidate,
|
|
3834
|
+
isValid: vehicleFormIsValid,
|
|
3835
|
+
},
|
|
3871
3836
|
},
|
|
3872
3837
|
{
|
|
3873
3838
|
key: 1,
|
|
3874
3839
|
path: '/driver',
|
|
3875
3840
|
name: 'Step 2',
|
|
3876
|
-
validateOptions: {
|
|
3841
|
+
validateOptions: {
|
|
3842
|
+
validate: driverFormValidate,
|
|
3843
|
+
isValid: driverFormIsValid,
|
|
3844
|
+
},
|
|
3877
3845
|
},
|
|
3878
3846
|
{
|
|
3879
3847
|
key: 2,
|
|
3880
3848
|
path: '/discount',
|
|
3881
3849
|
name: 'Step 3',
|
|
3882
|
-
validateOptions: {
|
|
3850
|
+
validateOptions: {
|
|
3851
|
+
validate: carDiscountFormValidate,
|
|
3852
|
+
isValid: carDiscountFormIsValid,
|
|
3853
|
+
},
|
|
3883
3854
|
requestFn: carPostRequestQuote,
|
|
3884
3855
|
},
|
|
3885
3856
|
],
|
|
@@ -3888,25 +3859,37 @@ const AppRouteWrapper = (props) => {
|
|
|
3888
3859
|
key: 0,
|
|
3889
3860
|
path: '/',
|
|
3890
3861
|
name: 'Step 1',
|
|
3891
|
-
validateOptions: {
|
|
3862
|
+
validateOptions: {
|
|
3863
|
+
validate: addressFormValidate,
|
|
3864
|
+
isValid: addressFormIsValid,
|
|
3865
|
+
},
|
|
3892
3866
|
},
|
|
3893
3867
|
{
|
|
3894
3868
|
key: 1,
|
|
3895
3869
|
path: '/applicant',
|
|
3896
3870
|
name: 'Step 2',
|
|
3897
|
-
validateOptions: {
|
|
3871
|
+
validateOptions: {
|
|
3872
|
+
validate: applicantFormValidate,
|
|
3873
|
+
isValid: applicantFormIsValid,
|
|
3874
|
+
},
|
|
3898
3875
|
},
|
|
3899
3876
|
{
|
|
3900
3877
|
key: 2,
|
|
3901
3878
|
path: '/property',
|
|
3902
3879
|
name: 'Step 3',
|
|
3903
|
-
validateOptions: {
|
|
3880
|
+
validateOptions: {
|
|
3881
|
+
validate: dwellingFormValidate,
|
|
3882
|
+
isValid: dwellingFormIsValid,
|
|
3883
|
+
},
|
|
3904
3884
|
},
|
|
3905
3885
|
{
|
|
3906
3886
|
key: 3,
|
|
3907
3887
|
path: '/discount',
|
|
3908
3888
|
name: 'Step 4',
|
|
3909
|
-
validateOptions: {
|
|
3889
|
+
validateOptions: {
|
|
3890
|
+
validate: homeDiscountFormValidate,
|
|
3891
|
+
isValid: homeDiscountFormIsValid,
|
|
3892
|
+
},
|
|
3910
3893
|
requestFn: homePostRequestQuote,
|
|
3911
3894
|
},
|
|
3912
3895
|
],
|
|
@@ -3915,25 +3898,37 @@ const AppRouteWrapper = (props) => {
|
|
|
3915
3898
|
key: 0,
|
|
3916
3899
|
path: '/',
|
|
3917
3900
|
name: 'Step 1',
|
|
3918
|
-
validateOptions: {
|
|
3901
|
+
validateOptions: {
|
|
3902
|
+
validate: addressFormValidate,
|
|
3903
|
+
isValid: addressFormIsValid,
|
|
3904
|
+
},
|
|
3919
3905
|
},
|
|
3920
3906
|
{
|
|
3921
3907
|
key: 1,
|
|
3922
3908
|
path: '/applicant',
|
|
3923
3909
|
name: 'Step 2',
|
|
3924
|
-
validateOptions: {
|
|
3910
|
+
validateOptions: {
|
|
3911
|
+
validate: applicantFormValidate,
|
|
3912
|
+
isValid: applicantFormIsValid,
|
|
3913
|
+
},
|
|
3925
3914
|
},
|
|
3926
3915
|
{
|
|
3927
3916
|
key: 2,
|
|
3928
3917
|
path: '/property',
|
|
3929
3918
|
name: 'Step 3',
|
|
3930
|
-
validateOptions: {
|
|
3919
|
+
validateOptions: {
|
|
3920
|
+
validate: dwellingFormValidate,
|
|
3921
|
+
isValid: dwellingFormIsValid,
|
|
3922
|
+
},
|
|
3931
3923
|
},
|
|
3932
3924
|
{
|
|
3933
3925
|
key: 3,
|
|
3934
3926
|
path: '/discount',
|
|
3935
3927
|
name: 'Step 4',
|
|
3936
|
-
validateOptions: {
|
|
3928
|
+
validateOptions: {
|
|
3929
|
+
validate: homeDiscountFormValidate,
|
|
3930
|
+
isValid: homeDiscountFormIsValid,
|
|
3931
|
+
},
|
|
3937
3932
|
requestFn: homePostRequestQuote,
|
|
3938
3933
|
},
|
|
3939
3934
|
],
|
|
@@ -3942,25 +3937,37 @@ const AppRouteWrapper = (props) => {
|
|
|
3942
3937
|
key: 0,
|
|
3943
3938
|
path: '/',
|
|
3944
3939
|
name: 'Step 1',
|
|
3945
|
-
validateOptions: {
|
|
3940
|
+
validateOptions: {
|
|
3941
|
+
validate: addressFormValidate,
|
|
3942
|
+
isValid: addressFormIsValid,
|
|
3943
|
+
},
|
|
3946
3944
|
},
|
|
3947
3945
|
{
|
|
3948
3946
|
key: 1,
|
|
3949
3947
|
path: '/applicant',
|
|
3950
3948
|
name: 'Step 2',
|
|
3951
|
-
validateOptions: {
|
|
3949
|
+
validateOptions: {
|
|
3950
|
+
validate: applicantFormValidate,
|
|
3951
|
+
isValid: applicantFormIsValid,
|
|
3952
|
+
},
|
|
3952
3953
|
},
|
|
3953
3954
|
{
|
|
3954
3955
|
key: 2,
|
|
3955
3956
|
path: '/property',
|
|
3956
3957
|
name: 'Step 3',
|
|
3957
|
-
validateOptions: {
|
|
3958
|
+
validateOptions: {
|
|
3959
|
+
validate: dwellingFormValidate,
|
|
3960
|
+
isValid: dwellingFormIsValid,
|
|
3961
|
+
},
|
|
3958
3962
|
},
|
|
3959
3963
|
{
|
|
3960
3964
|
key: 3,
|
|
3961
3965
|
path: '/discount',
|
|
3962
3966
|
name: 'Step 4',
|
|
3963
|
-
validateOptions: {
|
|
3967
|
+
validateOptions: {
|
|
3968
|
+
validate: homeDiscountFormValidate,
|
|
3969
|
+
isValid: homeDiscountFormIsValid,
|
|
3970
|
+
},
|
|
3964
3971
|
requestFn: homePostRequestQuote,
|
|
3965
3972
|
},
|
|
3966
3973
|
],
|
|
@@ -3969,13 +3976,19 @@ const AppRouteWrapper = (props) => {
|
|
|
3969
3976
|
key: 0,
|
|
3970
3977
|
path: '/',
|
|
3971
3978
|
name: 'Step 1',
|
|
3972
|
-
validateOptions: {
|
|
3979
|
+
validateOptions: {
|
|
3980
|
+
validate: coverageFormValidate,
|
|
3981
|
+
isValid: coverageFormIsValid,
|
|
3982
|
+
},
|
|
3973
3983
|
},
|
|
3974
3984
|
{
|
|
3975
3985
|
key: 1,
|
|
3976
3986
|
path: '/applicant',
|
|
3977
3987
|
name: 'Step 2',
|
|
3978
|
-
validateOptions: {
|
|
3988
|
+
validateOptions: {
|
|
3989
|
+
validate: lifeApplicantFormValidate,
|
|
3990
|
+
isValid: lifeApplicantFormIsValid,
|
|
3991
|
+
},
|
|
3979
3992
|
requestFn: lifePostRequestQuote,
|
|
3980
3993
|
},
|
|
3981
3994
|
],
|
|
@@ -3983,25 +3996,13 @@ const AppRouteWrapper = (props) => {
|
|
|
3983
3996
|
const [steps, setSteps] = useState(formSteps[insuranceType]);
|
|
3984
3997
|
const [validationHooks, setValidationHooks] = useState(formValidationHooks[insuranceType]);
|
|
3985
3998
|
const [progressLength, setProgressLength] = useState('');
|
|
3986
|
-
const [showContent, setShowContent] = useState(false);
|
|
3987
|
-
useEffect(() => {
|
|
3988
|
-
const checkTime = () => {
|
|
3989
|
-
const currentUTCDate = new Date();
|
|
3990
|
-
const currentHour = currentUTCDate.getUTCHours() - 5; // EST is UTC-5
|
|
3991
|
-
const currentDay = currentUTCDate.getUTCDay(); // Sunday is 0, Monday is 1, ..., Saturday is 6
|
|
3992
|
-
// Check if it's a weekday (Monday to Friday) and if the current hour is between 9 am and 6 pm
|
|
3993
|
-
const isWeekday = currentDay >= 1 && currentDay <= 5;
|
|
3994
|
-
const isWorkingHours = currentHour >= 9 && currentHour < 18;
|
|
3995
|
-
setShowContent(isWeekday && isWorkingHours);
|
|
3996
|
-
};
|
|
3997
|
-
checkTime(); // Initial check
|
|
3998
|
-
const interval = setInterval(checkTime, 60000); // Check every minute
|
|
3999
|
-
return () => clearInterval(interval); // Cleanup
|
|
4000
|
-
}, []); // Run effect only once on component mount
|
|
4001
3999
|
useEffect(() => {
|
|
4002
4000
|
let filteredSteps = formSteps[insuranceType];
|
|
4003
4001
|
let filteredHooks = formValidationHooks[insuranceType];
|
|
4004
|
-
if (isCompleted &&
|
|
4002
|
+
if (isCompleted &&
|
|
4003
|
+
(insuranceType === InsuranceTypes.Home ||
|
|
4004
|
+
insuranceType === InsuranceTypes.Condo ||
|
|
4005
|
+
insuranceType === InsuranceTypes.Tenant)) {
|
|
4005
4006
|
filteredSteps = formSteps[insuranceType].filter((item) => item.path !== '/property');
|
|
4006
4007
|
filteredHooks = formValidationHooks[insuranceType].filter((item) => item.path !== '/property');
|
|
4007
4008
|
}
|
|
@@ -4068,23 +4069,12 @@ const AppRouteWrapper = (props) => {
|
|
|
4068
4069
|
}
|
|
4069
4070
|
}
|
|
4070
4071
|
}, [carPostal, homePostal, lifePostal, isReady]);
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
const postalCodeDataBoxRect = postalCodeDataBox.getBoundingClientRect();
|
|
4078
|
-
const isScrolledPast = postalCodeDataBoxRect.bottom <= 0; // Change to <= if you want the banner to appear when the bottom of the box touches the top of the viewport
|
|
4079
|
-
setShowStickyBanner(isScrolledPast);
|
|
4080
|
-
}
|
|
4081
|
-
};
|
|
4082
|
-
window.addEventListener('scroll', handleScroll);
|
|
4083
|
-
return () => {
|
|
4084
|
-
window.removeEventListener('scroll', handleScroll);
|
|
4085
|
-
};
|
|
4086
|
-
}, []);
|
|
4087
|
-
return (jsx(Fragment, { children: isReady && (jsxs(Fragment, { children: [jsx(AppHeader, {}), jsx(AppModal, {}), insuranceType && (jsx(Fragment, { children: jsx(NavigationTop, { title: `${insuranceType.replace(/^./, insuranceType[0].toUpperCase())} Insurance Quote`, postalCode: postalCode, formSteps: steps, validationHooks: validationHooks, clearForm: clearFormData, propertyIsCompleted: isCompleted, id: "postalCodeData" }) })), showStickyBanner && showContent && isMobile && appType === AppTypes.MyChoice && (jsxs("div", { id: "stickyBanner", style: { position: "sticky", top: 0, color: "#FFFFFF", backgroundColor: "#8ED6DC", width: "100%", height: "75px", zIndex: 5000, display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center" }, children: [jsx("a", { style: { fontWeight: 700, fontSize: "22px" }, href: "tel:18884534644", children: "Need Help? Give us a call at" }), jsx("a", { style: { marginTop: "5px", textDecoration: "underline", fontWeight: 850 }, href: "tel:18884534644", children: "1-888-453-4644" })] })), insuranceType && appType === AppTypes.MyChoice && (jsx("div", { className: localIndex !== defaultLocalIndex ? 'step-progress-bar-partner' : 'step-progress-bar', children: jsx("span", { style: { width: progressLength } }) })), jsx("div", { className: `${insuranceType ? 'form-page-content' : ''} ${insuranceType && appType === AppTypes.MyChoice ? 'mychoice' : ''}`, children: insuranceType && appType === AppTypes.MyChoice && isDesktop && progressLength ? (jsx(Fragment, { children: jsxs("div", { className: "mychoice-content", children: [jsx(StepsBox, { className: "step-box", formSteps: steps, validationHooks: validationHooks, propertyIsCompleted: isCompleted }), children, jsx("div", { className: "empty-steps-container" })] }) })) : children }), isMychoice && !appLoaderState.isOpen && jsx(ProviderImageFooter, {})] })) }));
|
|
4072
|
+
return (jsx(Fragment, { children: isReady && (jsxs(Fragment, { children: [jsx(AppHeader, {}), jsx(AppModal, {}), insuranceType && (jsx(NavigationTop, { title: `${insuranceType.replace(/^./, insuranceType[0].toUpperCase())} Insurance Quote`, postalCode: postalCode, formSteps: steps, validationHooks: validationHooks, clearForm: clearFormData, propertyIsCompleted: isCompleted })), insuranceType && appType === AppTypes.MyChoice && (jsx("div", { className: localIndex !== defaultLocalIndex
|
|
4073
|
+
? 'step-progress-bar-partner'
|
|
4074
|
+
: 'step-progress-bar', children: jsx("span", { style: { width: progressLength } }) })), jsx("div", { className: `${insuranceType ? 'form-page-content' : ''} ${insuranceType && appType === AppTypes.MyChoice ? 'mychoice' : ''}`, children: insuranceType &&
|
|
4075
|
+
appType === AppTypes.MyChoice &&
|
|
4076
|
+
isDesktop &&
|
|
4077
|
+
progressLength ? (jsx(Fragment, { children: jsxs("div", { className: "mychoice-content", children: [jsx(StepsBox, { className: "step-box", formSteps: steps, validationHooks: validationHooks, propertyIsCompleted: isCompleted }), children, jsx("div", { className: "empty-steps-container" })] }) })) : (children) }), isMychoice && !appLoaderState.isOpen && jsx(ProviderImageFooter, {})] })) }));
|
|
4088
4078
|
};
|
|
4089
4079
|
const NestedRoutes = () => {
|
|
4090
4080
|
const insuranceType = getInsuranceType();
|
|
@@ -4095,10 +4085,11 @@ const NestedRoutes = () => {
|
|
|
4095
4085
|
payload: true,
|
|
4096
4086
|
});
|
|
4097
4087
|
});
|
|
4098
|
-
return (jsx(Fragment, { children: appConfigState.drawWrapper && (jsx(Fragment, { children: jsxs(Routes, { children: [jsx(Route, { path: "*", element: jsx(Navigate, { to: {
|
|
4099
|
-
|
|
4088
|
+
return (jsx(Fragment, { children: appConfigState.drawWrapper && (jsx(Fragment, { children: jsxs(Routes, { children: [jsx(Route, { path: "*", element: jsx(Navigate, { to: {
|
|
4089
|
+
pathname: `/${appConfigState.localIndex || defaultLocalIndex}/${insuranceType}`,
|
|
4090
|
+
} }) }), insuranceType === InsuranceTypes.Car && (jsxs(Route, { path: "car", children: [jsx(Route, { index: true, element: jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsx(RouteWrapperPublic, { children: jsx(PageVehicle, {}) }) }) }), jsx(Route, { path: "driver", element: jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsx(RouteWrapperPublic, { children: jsx(PageDriver, {}) }) }) }), jsx(Route, { path: "discount", element: jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsx(RouteWrapperPublic, { children: jsx(PageCarDiscount, {}) }) }) }), jsx(Route, { path: "quotes", element: jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsx(RouteWrapperPublic, { children: jsx(PageCarQuote, {}) }) }) }), jsx(Route, { path: "offer", element: jsx(AppRouteWrapper, { insuranceType: insuranceType, children: jsx(RouteWrapperPublic, { children: jsx(PageCarQuote, {}) }) }) })] })), jsxs(Route, { path: "home", children: [jsx(Route, { index: true, element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Home, children: jsx(RouteWrapperPublic, { children: jsx(PageAddress, {}) }) }) }), jsx(Route, { path: "applicant", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Home, children: jsx(RouteWrapperPublic, { children: jsx(PageApplicant, {}) }) }) }), jsx(Route, { path: "property", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Home, children: jsx(RouteWrapperPublic, { children: jsx(PageProperty, {}) }) }) }), jsx(Route, { path: "discount", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Home, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeDiscount, {}) }) }) }), jsx(Route, { path: "quotes", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Home, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeQuote, {}) }) }) })] }), jsxs(Route, { path: "condo", children: [jsx(Route, { index: true, element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Condo, children: jsx(RouteWrapperPublic, { children: jsx(PageAddress, {}) }) }) }), jsx(Route, { path: "applicant", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Condo, children: jsx(RouteWrapperPublic, { children: jsx(PageApplicant, {}) }) }) }), jsx(Route, { path: "property", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Condo, children: jsx(RouteWrapperPublic, { children: jsx(PageProperty, {}) }) }) }), jsx(Route, { path: "discount", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Condo, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeDiscount, {}) }) }) }), jsx(Route, { path: "quotes", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Condo, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeQuote, {}) }) }) })] }), jsxs(Route, { path: "tenant", children: [jsx(Route, { index: true, element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Tenant, children: jsx(RouteWrapperPublic, { children: jsx(PageAddress, {}) }) }) }), jsx(Route, { path: "applicant", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Tenant, children: jsx(RouteWrapperPublic, { children: jsx(PageApplicant, {}) }) }) }), jsx(Route, { path: "property", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Tenant, children: jsx(RouteWrapperPublic, { children: jsx(PageProperty, {}) }) }) }), jsx(Route, { path: "discount", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Tenant, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeDiscount, {}) }) }) }), jsx(Route, { path: "quotes", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Tenant, children: jsx(RouteWrapperPublic, { children: jsx(PageHomeQuote, {}) }) }) })] }), jsxs(Route, { path: "life", children: [jsx(Route, { index: true, element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Life, children: jsx(RouteWrapperPublic, { children: jsx(PageCoverage, {}) }) }) }), jsx(Route, { path: "applicant", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Life, children: jsx(RouteWrapperPublic, { children: jsx(PageLifeApplicant, {}) }) }) }), jsx(Route, { path: "quotes", element: jsx(AppRouteWrapper, { insuranceType: InsuranceTypes.Life, children: jsx(RouteWrapperPublic, { children: jsx(PageLifeQuote, {}) }) }) })] })] }) })) }));
|
|
4100
4091
|
};
|
|
4101
|
-
const RedirectWithSearchParams = ({ to, path }) => {
|
|
4092
|
+
const RedirectWithSearchParams = ({ to, path, }) => {
|
|
4102
4093
|
const insuranceType = getInsuranceType();
|
|
4103
4094
|
useStoreAppConfig();
|
|
4104
4095
|
const [isRender, setIsRender] = useState(false);
|
|
@@ -4110,10 +4101,12 @@ const RedirectWithSearchParams = ({ to, path }) => {
|
|
|
4110
4101
|
const toBasePath = to?.split('/')?.slice(-1)?.[0];
|
|
4111
4102
|
useEffectOnce(() => {
|
|
4112
4103
|
if (queryRoot.length > 1) {
|
|
4113
|
-
const query = JSON.parse(`{"${decodeURI(queryRoot[1])
|
|
4114
|
-
|
|
4104
|
+
const query = JSON.parse(`{"${decodeURI(queryRoot[1])
|
|
4105
|
+
.replace(/"/g, '\\"')
|
|
4106
|
+
.replace(/&/g, '","')
|
|
4107
|
+
.replace(/=/g, '":"')}"}`);
|
|
4115
4108
|
if (!isRender) {
|
|
4116
|
-
if (query.postal_code &&
|
|
4109
|
+
if (query.postal_code && insuranceType !== InsuranceTypes.Life) {
|
|
4117
4110
|
const formattedPostalCode = query.postal_code.replace(' ', '');
|
|
4118
4111
|
getPostal(formattedPostalCode).then(() => {
|
|
4119
4112
|
setIsRender(true);
|
|
@@ -4142,7 +4135,9 @@ const RedirectWithSearchParams = ({ to, path }) => {
|
|
|
4142
4135
|
});
|
|
4143
4136
|
}
|
|
4144
4137
|
}
|
|
4145
|
-
if (insuranceType === InsuranceTypes.Home ||
|
|
4138
|
+
if (insuranceType === InsuranceTypes.Home ||
|
|
4139
|
+
insuranceType === InsuranceTypes.Condo ||
|
|
4140
|
+
insuranceType === InsuranceTypes.Tenant) {
|
|
4146
4141
|
if (query.utm_source) {
|
|
4147
4142
|
dispatchHomeDiscountState({
|
|
4148
4143
|
type: StoreFormHomeDiscountActionTypes.FormHomeUtmSourceSet,
|
|
@@ -4155,7 +4150,8 @@ const RedirectWithSearchParams = ({ to, path }) => {
|
|
|
4155
4150
|
payload: { utmCampaign: query.utm_campaign },
|
|
4156
4151
|
});
|
|
4157
4152
|
}
|
|
4158
|
-
if (path === 'broker' ||
|
|
4153
|
+
if (path === 'broker' ||
|
|
4154
|
+
['home', 'condo', 'tenant'].includes(toBasePath)) {
|
|
4159
4155
|
dispatchHomeDiscountState({
|
|
4160
4156
|
type: StoreFormHomeDiscountActionTypes.FormHomeQuoterBrokerInfoSet,
|
|
4161
4157
|
payload: query,
|
|
@@ -4187,10 +4183,8 @@ const RedirectWithSearchParams = ({ to, path }) => {
|
|
|
4187
4183
|
const AppRoutes = (props) => {
|
|
4188
4184
|
const { appType } = props;
|
|
4189
4185
|
const defaultInsuranceType = getInsuranceType();
|
|
4190
|
-
const { appConfigState: { localIndex, insuranceType } } = useStoreAppConfig();
|
|
4191
|
-
return (jsxs(BrowserRouter, { children: [jsx(AppTitle, { appType: appType, insuranceType: insuranceType }), jsx(AppRouterListener, {}), jsxs(Routes, { children: [jsx(Route, { path: "/", element:
|
|
4192
|
-
// <BrokerKeys redirectURL={`/${localIndex}/${defaultInsuranceType}`} />
|
|
4193
|
-
) }), jsx(Route, { path: `/${localIndex}`, element: (jsx(NestedRoutes, { appType: appType })) }), jsx(Route, { path: `/${localIndex}/*`, element: (jsx(NestedRoutes, { appType: appType })) }), jsx(Route, { path: "/postal/*", element: (jsx(RedirectWithSearchParams, { to: `/${localIndex}/${defaultInsuranceType}` })) }), jsx(Route, { path: "/auto/postal/*", element: (jsx(RedirectWithSearchParams, { to: `/${localIndex}/${defaultInsuranceType}` })) })] })] }));
|
|
4186
|
+
const { appConfigState: { localIndex, insuranceType }, } = useStoreAppConfig();
|
|
4187
|
+
return (jsxs(BrowserRouter, { children: [jsx(AppTitle, { appType: appType, insuranceType: insuranceType }), jsx(AppRouterListener, {}), jsxs(Routes, { children: [jsx(Route, { path: "/", element: jsx(RedirectWithSearchParams, { to: `/${localIndex}/${defaultInsuranceType}` }) }), jsx(Route, { path: `/${localIndex}`, element: jsx(RedirectWithSearchParams, { to: `/${localIndex}/${defaultInsuranceType}` }) }), jsx(Route, { path: "*", element: jsx(RedirectWithSearchParams, { to: `/${localIndex}/${defaultInsuranceType}` }) }), jsx(Route, { path: "/broker", element: jsx(RedirectWithSearchParams, { to: `/${localIndex}/${defaultInsuranceType}`, path: "broker" }) }), jsx(Route, { path: `/${localIndex}`, element: jsx(NestedRoutes, { appType: appType }) }), jsx(Route, { path: `/${localIndex}/*`, element: jsx(NestedRoutes, { appType: appType }) }), jsx(Route, { path: "/postal/*", element: jsx(RedirectWithSearchParams, { to: `/${localIndex}/${defaultInsuranceType}` }) }), jsx(Route, { path: "/auto/postal/*", element: jsx(RedirectWithSearchParams, { to: `/${localIndex}/${defaultInsuranceType}` }) })] })] }));
|
|
4194
4188
|
};
|
|
4195
4189
|
|
|
4196
4190
|
const AppLoader = () => {
|