@lendi/navbar 7.44.1 → 7.44.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.
@@ -465,8 +465,9 @@ var DropdownMenu = () => {
465
465
  gpCustomerDashboardWithProperties
466
466
  } = launchdarkly.useFlags();
467
467
 
468
- // Determine dashboard path based on feature flag
469
- var dashboardPath = gpCustomerDashboardWithProperties ? '/my-profile/' : DASHBOARD_V2_PATH;
468
+ // Determine dashboard path based on feature flag (Aussie only)
469
+ var isAussie = brand === lalaUtils.Brand.Aussie;
470
+ var dashboardPath = isAussie && gpCustomerDashboardWithProperties ? '/my-profile/' : DASHBOARD_V2_PATH;
470
471
  return /*#__PURE__*/jsxRuntime.jsxs(LogoutWrapper, {
471
472
  children: [/*#__PURE__*/jsxRuntime.jsx(MyAccountTitle, {
472
473
  children: "My account"
@@ -1837,9 +1838,9 @@ var usePartnerBrand = () => {
1837
1838
  setPartnerId(partnerIdQuery);
1838
1839
  }
1839
1840
  }
1840
- // If not, check if we already have a partner ID in session storage
1841
+ // If not, check if we already have a partner ID in session storage, ensure it is not a single quote
1841
1842
  var existingPartnerId = sessionStorage.getItem('GP_PARTNER_ID');
1842
- if (existingPartnerId) {
1843
+ if (existingPartnerId && existingPartnerId.replace(/^'|'$/g, '') !== '') {
1843
1844
  setPartnerId(existingPartnerId);
1844
1845
  return;
1845
1846
  }
@@ -1877,7 +1878,7 @@ var SimpleNavbarComponent = _ref => {
1877
1878
  // Set to aussie domain for either brands
1878
1879
  var env = getEnvFromHostname((_window = window) === null || _window === void 0 || (_window = _window.location) === null || _window === void 0 ? void 0 : _window.hostname);
1879
1880
  var BASE_URL = env === lalaUtils.Environment.Production ? 'https://www.aussie.com.au' : env === lalaUtils.Environment.Staging ? 'https://aussie-stg.com.au' : "https://aussie-dev.com.au";
1880
- var PARTNER_LOGO_BASE_PATH = '/growth-product-assets/partner-logos/';
1881
+ var PARTNER_LOGO_BASE_PATH = '/aussie-cms-assets/partner-logos/';
1881
1882
  // to set AHL value in session storage for funnel1 journey
1882
1883
  useAHLParam();
1883
1884
  var partnerId = usePartnerBrand();
@@ -248,7 +248,7 @@ var _templateObject$d, _templateObject$c, _templateObject$b, _templateObject$a,
248
248
  forceDisplay: !0
249
249
  });
250
250
  }, DropdownMenu = () => {
251
- var {brand: brand} = lalaReact.useSession(), isDomain = lalaUtils.getBrandFromHostname() === lalaUtils.Brand.Domain, isLendi = brand === lalaUtils.Brand.Lendi, isSVA = checkSVA(), path = isDomain ? PATH_DOMAIN : PATH_LENDI, {hideDashboardItem: hideDashboardItem, hideManageApplicationsItem: hideManageApplicationsItem, onLogout: onLogout} = useDropdownMenu(), {sendFeedback: sendFeedback, referAFriend: referAFriend, gpCustomerDashboardWithProperties: gpCustomerDashboardWithProperties} = launchdarkly.useFlags(), dashboardPath = gpCustomerDashboardWithProperties ? "/my-profile/" : DASHBOARD_V2_PATH;
251
+ var {brand: brand} = lalaReact.useSession(), isDomain = lalaUtils.getBrandFromHostname() === lalaUtils.Brand.Domain, isLendi = brand === lalaUtils.Brand.Lendi, isSVA = checkSVA(), path = isDomain ? PATH_DOMAIN : PATH_LENDI, {hideDashboardItem: hideDashboardItem, hideManageApplicationsItem: hideManageApplicationsItem, onLogout: onLogout} = useDropdownMenu(), {sendFeedback: sendFeedback, referAFriend: referAFriend, gpCustomerDashboardWithProperties: gpCustomerDashboardWithProperties} = launchdarkly.useFlags(), dashboardPath = brand === lalaUtils.Brand.Aussie && gpCustomerDashboardWithProperties ? "/my-profile/" : DASHBOARD_V2_PATH;
252
252
  return jsxRuntime.jsxs(LogoutWrapper, {
253
253
  children: [ jsxRuntime.jsx(MyAccountTitle, {
254
254
  children: "My account"
@@ -1138,7 +1138,7 @@ var _templateObject$9, _templateObject2$4, _templateObject$8, _templateObject2$3
1138
1138
  partnerIdQuery && (sessionStorage.setItem("GP_PARTNER_ID", partnerIdQuery), setPartnerId(partnerIdQuery));
1139
1139
  }
1140
1140
  var existingPartnerId = sessionStorage.getItem("GP_PARTNER_ID");
1141
- existingPartnerId && setPartnerId(existingPartnerId);
1141
+ existingPartnerId && "" !== existingPartnerId.replace(/^'|'$/g, "") && setPartnerId(existingPartnerId);
1142
1142
  }), []), partnerId;
1143
1143
  }, SimpleNavbarComponent = _ref => {
1144
1144
  var _window, {useTransparent: useTransparent = !1, showBookanAppointmentCta: showBookanAppointmentCta = !0, showTalkToExpertCta: showTalkToExpertCta = !0, homeURL: homeURL, params: params = "", continueURL: continueURL = "/", onLogout: onLogout, showContinueAction: showContinueAction = !1, hideDashboardItem: hideDashboardItem, hideManageApplicationsItem: hideManageApplicationsItem, isCommPanelOpen: isCommPanelOpen, hasUnread: hasUnread, closeCommPanel: closeCommPanel, openCommPanel: _openCommPanel, customerOwner: customerOwner} = _ref, {primaryBrandCustomerAlert: primaryBrandCustomerAlert} = launchdarkly.useFlags(), session = lalaReact.useSession(), isAuthenticated = session.status === lalaReact.Status.Authenticated, env = getEnvFromHostname(null === (_window = window) || void 0 === _window || null === (_window = _window.location) || void 0 === _window ? void 0 : _window.hostname), BASE_URL = env === lalaUtils.Environment.Production ? "https://www.aussie.com.au" : env === lalaUtils.Environment.Staging ? "https://aussie-stg.com.au" : "https://aussie-dev.com.au";
@@ -1159,7 +1159,7 @@ var _templateObject$9, _templateObject2$4, _templateObject$8, _templateObject2$3
1159
1159
  width: "24px",
1160
1160
  height: "24px"
1161
1161
  }), jsxRuntime.jsx("img", {
1162
- src: "".concat(BASE_URL).concat("/growth-product-assets/partner-logos/").concat(partnerId, ".png"),
1162
+ src: "".concat(BASE_URL).concat("/aussie-cms-assets/partner-logos/").concat(partnerId, ".png"),
1163
1163
  alt: "Partner Logo"
1164
1164
  }) ]
1165
1165
  }) ]
@@ -431,8 +431,9 @@ var DropdownMenu = () => {
431
431
  gpCustomerDashboardWithProperties
432
432
  } = useFlags();
433
433
 
434
- // Determine dashboard path based on feature flag
435
- var dashboardPath = gpCustomerDashboardWithProperties ? '/my-profile/' : DASHBOARD_V2_PATH;
434
+ // Determine dashboard path based on feature flag (Aussie only)
435
+ var isAussie = brand === Brand.Aussie;
436
+ var dashboardPath = isAussie && gpCustomerDashboardWithProperties ? '/my-profile/' : DASHBOARD_V2_PATH;
436
437
  return /*#__PURE__*/jsxs(LogoutWrapper, {
437
438
  children: [/*#__PURE__*/jsx(MyAccountTitle, {
438
439
  children: "My account"
@@ -1803,9 +1804,9 @@ var usePartnerBrand = () => {
1803
1804
  setPartnerId(partnerIdQuery);
1804
1805
  }
1805
1806
  }
1806
- // If not, check if we already have a partner ID in session storage
1807
+ // If not, check if we already have a partner ID in session storage, ensure it is not a single quote
1807
1808
  var existingPartnerId = sessionStorage.getItem('GP_PARTNER_ID');
1808
- if (existingPartnerId) {
1809
+ if (existingPartnerId && existingPartnerId.replace(/^'|'$/g, '') !== '') {
1809
1810
  setPartnerId(existingPartnerId);
1810
1811
  return;
1811
1812
  }
@@ -1843,7 +1844,7 @@ var SimpleNavbarComponent = _ref => {
1843
1844
  // Set to aussie domain for either brands
1844
1845
  var env = getEnvFromHostname((_window = window) === null || _window === void 0 || (_window = _window.location) === null || _window === void 0 ? void 0 : _window.hostname);
1845
1846
  var BASE_URL = env === Environment$1.Production ? 'https://www.aussie.com.au' : env === Environment$1.Staging ? 'https://aussie-stg.com.au' : "https://aussie-dev.com.au";
1846
- var PARTNER_LOGO_BASE_PATH = '/growth-product-assets/partner-logos/';
1847
+ var PARTNER_LOGO_BASE_PATH = '/aussie-cms-assets/partner-logos/';
1847
1848
  // to set AHL value in session storage for funnel1 journey
1848
1849
  useAHLParam();
1849
1850
  var partnerId = usePartnerBrand();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lendi/navbar",
3
3
  "access": "restricted",
4
- "version": "7.44.1",
4
+ "version": "7.44.3",
5
5
  "license": "ISC",
6
6
  "source": "src/index.tsx",
7
7
  "main": "dist/navbar.cjs.js",