@mychoice/mychoice-sdk-modules 2.2.2 → 2.2.3
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 +7 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +7 -3
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -507,7 +507,7 @@ const HeaderBeginInsurance = ({ className }) => {
|
|
|
507
507
|
const { appConfigState: { insuranceType }, } = useStoreAppConfig();
|
|
508
508
|
const insuranceTypeCls = insuranceType !== InsuranceTypes.Car && insuranceType !== InsuranceTypes.Life ? InsuranceTypes.Home : insuranceType;
|
|
509
509
|
const { externalPathGroup } = usePathGroups(insuranceTypeCls);
|
|
510
|
-
return (jsx("div", { className: `${className} primary-header`, children: jsxs("div", { className: "content", children: [jsx("div", { className: "logo", children: jsx("a", { href: "https://
|
|
510
|
+
return (jsx("div", { className: `${className} primary-header`, children: jsxs("div", { className: "content", children: [jsx("div", { className: "logo", children: jsx("a", { href: "https://begininsurance.ca/en", rel: "noreferrer", children: jsx("img", { src: logo, alt: "Begin Insurance" }) }) }), jsx("div", { className: "nav-links", children: jsx(HeaderNavGroup, { className: insuranceTypeCls, navItems: externalPathGroup, isExternal: true }) }), jsx("div", { className: "empty-box" })] }) }));
|
|
511
511
|
};
|
|
512
512
|
HeaderBeginInsurance.defaultProps = {
|
|
513
513
|
className: '',
|
|
@@ -533,7 +533,7 @@ const HeaderBeginInsuranceMobile = ({ className }) => {
|
|
|
533
533
|
const handleMenuClick = () => {
|
|
534
534
|
setIsMenuOpen(!isMenuOpen);
|
|
535
535
|
};
|
|
536
|
-
return (jsxs("div", { className: `${className} ${isMenuOpen ? 'open' : ''} primary-header-mobile`, children: [jsxs("div", { className: "content-mobile", children: [jsx("div", { className: "logo", children: jsx("a", { href: "https://
|
|
536
|
+
return (jsxs("div", { className: `${className} ${isMenuOpen ? 'open' : ''} primary-header-mobile`, children: [jsxs("div", { className: "content-mobile", children: [jsx("div", { className: "logo", children: jsx("a", { href: "https://begininsurance.ca/en", target: "_blank", rel: "noreferrer", children: jsx("img", { src: logo, alt: "Begin Insurance" }) }) }), jsx(ButtonMenu, { className: `${className} ${isMenuOpen ? 'is-active' : ''}`, onClick: handleMenuClick })] }), isMenuOpen && (jsx("div", { className: "menu-items", children: jsx("div", { className: "nav-links", children: jsx(HeaderNavGroup, { className: insuranceType, navItems: externalPathGroup, isExternal: true }) }) }))] }));
|
|
537
537
|
};
|
|
538
538
|
HeaderBeginInsuranceMobile.defaultProps = {
|
|
539
539
|
className: '',
|
|
@@ -4518,6 +4518,10 @@ const AppConfig = (props) => {
|
|
|
4518
4518
|
const localIndex = window.location.pathname.split('/')[1];
|
|
4519
4519
|
const authHandler = useHandlerAuth();
|
|
4520
4520
|
const partnerHandler = useHandlerPartner();
|
|
4521
|
+
// Check if localIndex is actually an insurance type (car, home, condo, tenant, life)
|
|
4522
|
+
// In that case, it should not be treated as a partner ID
|
|
4523
|
+
const insuranceTypeValues = Object.values(InsuranceTypes);
|
|
4524
|
+
const isInsuranceTypePath = insuranceTypeValues.includes(localIndex);
|
|
4521
4525
|
const windowResize = () => {
|
|
4522
4526
|
dispatchDeviceState({
|
|
4523
4527
|
type: StoreConfigAppDeviceActionTypes.AppDeviceSetSize,
|
|
@@ -4536,7 +4540,7 @@ const AppConfig = (props) => {
|
|
|
4536
4540
|
payload: appType,
|
|
4537
4541
|
});
|
|
4538
4542
|
}
|
|
4539
|
-
if (appType !== AppTypes.TheBig && localIndex !== defaultLocalIndex && localIndex !== '') {
|
|
4543
|
+
if (appType !== AppTypes.TheBig && localIndex !== defaultLocalIndex && localIndex !== '' && !isInsuranceTypePath) {
|
|
4540
4544
|
partnerHandler.getPartner(localIndex);
|
|
4541
4545
|
}
|
|
4542
4546
|
else {
|