@mychoice/mychoice-sdk-modules 2.1.54 → 2.1.56

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 CHANGED
@@ -194,15 +194,19 @@ const NoQuotesMessage = ({ type }) => {
194
194
  const usePathGroups = (insuranceType) => {
195
195
  const { appConfigState } = mychoiceSdkStore.useStoreAppConfig();
196
196
  const insurancePathGroup = {
197
- [`${mychoiceSdkComponents.InsuranceTypes.Car}`]: [{ name: 'Car', link: `/${appConfigState.localIndex}/car` }],
198
- [`${mychoiceSdkComponents.InsuranceTypes.Home}`]: [{ name: 'Home', link: `/${appConfigState.localIndex}/home` }],
197
+ [`${mychoiceSdkComponents.InsuranceTypes.Car}`]: [
198
+ { name: 'Car', link: `/${appConfigState.localIndex}/car` },
199
+ ],
200
+ [`${mychoiceSdkComponents.InsuranceTypes.Home}`]: [
201
+ { name: 'Home', link: `/${appConfigState.localIndex}/home` },
202
+ ],
199
203
  // @todo: will be used in future
200
204
  // [`${InsuranceTypes.Life}`]: [{ name: 'Life', link: `/${appConfigState.localIndex}/life` }],
201
205
  };
202
206
  const externalPathGroup = [
203
207
  { name: 'Car', link: 'https://quote.mychoice.ca/insurance/car' },
204
208
  { name: 'Home', link: 'https://quote.mychoice.ca/insurance/home' },
205
- { name: 'Life', link: 'https://quote.mychoice.ca/insurance/life' },
209
+ { name: 'Life', link: 'https://staging.new.mychoice.ca/insurance/life' },
206
210
  { name: 'Learn', link: 'https://www.mychoice.ca/blog/' },
207
211
  ];
208
212
  // @todo: use in future.
@@ -225,10 +229,13 @@ const usePathGroups = (insuranceType) => {
225
229
  };
226
230
 
227
231
  const HeaderMyChoice = ({ className, }) => {
228
- const { appConfigState: { insuranceType } } = mychoiceSdkStore.useStoreAppConfig();
229
- const insuranceTypeCls = ((insuranceType !== mychoiceSdkComponents.InsuranceTypes.Car) && (insuranceType !== mychoiceSdkComponents.InsuranceTypes.Life)) ? mychoiceSdkComponents.InsuranceTypes.Home : insuranceType;
232
+ const { appConfigState: { insuranceType }, } = mychoiceSdkStore.useStoreAppConfig();
233
+ const insuranceTypeCls = insuranceType !== mychoiceSdkComponents.InsuranceTypes.Car &&
234
+ insuranceType !== mychoiceSdkComponents.InsuranceTypes.Life
235
+ ? mychoiceSdkComponents.InsuranceTypes.Home
236
+ : insuranceType;
230
237
  const { externalPathGroup } = usePathGroups(insuranceTypeCls);
231
- return (jsxRuntime.jsx("div", { className: `${className} primary-header`, children: jsxRuntime.jsxs("div", { className: "content", children: [jsxRuntime.jsx("div", { className: "logo", children: jsxRuntime.jsx("a", { href: "https://www.mychoice.ca/", rel: "noreferrer", children: jsxRuntime.jsx("img", { src: logo, alt: "logotype" }) }) }), jsxRuntime.jsx("div", { className: "nav-links", children: jsxRuntime.jsx(mychoiceSdkComponents.HeaderNavGroup, { className: insuranceTypeCls, navItems: externalPathGroup, isExternal: true }) }), jsxRuntime.jsx("div", { className: "empty-box" })] }) }));
238
+ return (jsxRuntime.jsx("div", { className: `${className} primary-header`, children: jsxRuntime.jsxs("div", { className: "content", children: [jsxRuntime.jsx("div", { className: "logo", children: jsxRuntime.jsx("a", { href: "https://www.mychoice.ca/", rel: "noreferrer", children: jsxRuntime.jsx("img", { src: logo, alt: "logotype" }) }) }), jsxRuntime.jsx("div", { className: "nav-links", children: jsxRuntime.jsx(mychoiceSdkComponents.HeaderNavGroup, { className: insuranceTypeCls, navItems: externalPathGroup }) }), jsxRuntime.jsx("div", { className: "empty-box" })] }) }));
232
239
  };
233
240
  HeaderMyChoice.defaultProps = {
234
241
  className: '',