@lendi/navbar 7.42.2 → 7.44.0
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const usePartnerBrand: () => string | null;
|
package/dist/navbar.cjs.dev.js
CHANGED
|
@@ -38,6 +38,7 @@ var KeyboardArrowDown = require('@lendi-ui/icon/KeyboardArrowDown');
|
|
|
38
38
|
var KeyboardArrowRight = require('@lendi-ui/icon/KeyboardArrowRight');
|
|
39
39
|
var KeyboardArrowLeft = require('@lendi-ui/icon/KeyboardArrowLeft');
|
|
40
40
|
var FocusLock = require('react-focus-lock');
|
|
41
|
+
var icon = require('@lendi-ui/icon');
|
|
41
42
|
var Menu = require('@lendi-ui/icon/Menu');
|
|
42
43
|
var Sidebar = require('@lendi-ui/sidebar');
|
|
43
44
|
var ArrowDropDown = require('@lendi-ui/icon/ArrowDropDown');
|
|
@@ -280,7 +281,7 @@ var MenuLogoWrapper = styled__default["default"].div.withConfig({
|
|
|
280
281
|
var NavbarLeftWrapper = styled__default["default"].div.withConfig({
|
|
281
282
|
displayName: "styles__NavbarLeftWrapper",
|
|
282
283
|
componentId: "lui__sc-ej7i4l-3"
|
|
283
|
-
})(["flex:1 0 auto;"]);
|
|
284
|
+
})(["flex:1 0 auto;display:flex;align-items:center;gap:1rem;"]);
|
|
284
285
|
var NavbarRightWrapper = styled__default["default"].div.withConfig({
|
|
285
286
|
displayName: "styles__NavbarRightWrapper",
|
|
286
287
|
componentId: "lui__sc-ej7i4l-4"
|
|
@@ -1820,8 +1821,31 @@ var useAHLParam = () => {
|
|
|
1820
1821
|
}, []);
|
|
1821
1822
|
};
|
|
1822
1823
|
|
|
1824
|
+
var usePartnerBrand = () => {
|
|
1825
|
+
var [partnerId, setPartnerId] = React.useState(null);
|
|
1826
|
+
React.useEffect(() => {
|
|
1827
|
+
if (typeof window !== 'undefined' && window.sessionStorage) {
|
|
1828
|
+
// First, check URL params
|
|
1829
|
+
var urlParams = new URLSearchParams(window.location.search);
|
|
1830
|
+
var partnerIdQuery = urlParams.get('partnerid');
|
|
1831
|
+
if (partnerIdQuery) {
|
|
1832
|
+
sessionStorage.setItem('GP_PARTNER_ID', partnerIdQuery);
|
|
1833
|
+
setPartnerId(partnerIdQuery);
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
// If not, check if we already have a partner ID in session storage
|
|
1837
|
+
var existingPartnerId = sessionStorage.getItem('GP_PARTNER_ID');
|
|
1838
|
+
if (existingPartnerId) {
|
|
1839
|
+
setPartnerId(existingPartnerId);
|
|
1840
|
+
return;
|
|
1841
|
+
}
|
|
1842
|
+
}, []);
|
|
1843
|
+
return partnerId;
|
|
1844
|
+
};
|
|
1845
|
+
|
|
1823
1846
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1824
1847
|
var SimpleNavbarComponent = _ref => {
|
|
1848
|
+
var _window;
|
|
1825
1849
|
var {
|
|
1826
1850
|
// Public props
|
|
1827
1851
|
useTransparent = false,
|
|
@@ -1846,20 +1870,32 @@ var SimpleNavbarComponent = _ref => {
|
|
|
1846
1870
|
} = launchdarkly.useFlags();
|
|
1847
1871
|
var session = lalaReact.useSession();
|
|
1848
1872
|
var isAuthenticated = session.status === lalaReact.Status.Authenticated;
|
|
1849
|
-
|
|
1873
|
+
// Set to aussie domain for either brands
|
|
1874
|
+
var env = getEnvFromHostname((_window = window) === null || _window === void 0 || (_window = _window.location) === null || _window === void 0 ? void 0 : _window.hostname);
|
|
1875
|
+
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";
|
|
1876
|
+
var PARTNER_LOGO_BASE_PATH = '/growth-product-assets/partner-logos/';
|
|
1850
1877
|
// to set AHL value in session storage for funnel1 journey
|
|
1851
1878
|
useAHLParam();
|
|
1879
|
+
var partnerId = usePartnerBrand();
|
|
1852
1880
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1853
1881
|
children: [/*#__PURE__*/jsxRuntime.jsxs(NavbarWrapper, {
|
|
1854
1882
|
isTransparent: useTransparent,
|
|
1855
1883
|
isAuthenticated: isAuthenticated,
|
|
1856
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
1857
|
-
children: /*#__PURE__*/jsxRuntime.jsx(LogoComponent$1, {
|
|
1884
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(NavbarLeftWrapper, {
|
|
1885
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(LogoComponent$1, {
|
|
1858
1886
|
homeURL: homeURL,
|
|
1859
1887
|
params: params,
|
|
1860
1888
|
"aria-label": "Logo",
|
|
1861
1889
|
hasHamburgerMenu: false
|
|
1862
|
-
})
|
|
1890
|
+
}), partnerId && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1891
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(icon.Close, {
|
|
1892
|
+
width: "24px",
|
|
1893
|
+
height: "24px"
|
|
1894
|
+
}), /*#__PURE__*/jsxRuntime.jsx("img", {
|
|
1895
|
+
src: "".concat(BASE_URL).concat(PARTNER_LOGO_BASE_PATH).concat(partnerId, ".png"),
|
|
1896
|
+
alt: "Partner Logo"
|
|
1897
|
+
})]
|
|
1898
|
+
})]
|
|
1863
1899
|
}), /*#__PURE__*/jsxRuntime.jsx(NavbarRightWrapper, {
|
|
1864
1900
|
children: /*#__PURE__*/jsxRuntime.jsx(DropdownProvider, {
|
|
1865
1901
|
hideDashboardItem: hideDashboardItem,
|
|
@@ -3551,6 +3587,10 @@ var TalkToExpertButton = _ref => {
|
|
|
3551
3587
|
store,
|
|
3552
3588
|
broker
|
|
3553
3589
|
} = chat.useBootstrappedChatState();
|
|
3590
|
+
var {
|
|
3591
|
+
gpBookAppointmentInterim
|
|
3592
|
+
} = launchdarkly.useFlags();
|
|
3593
|
+
var bookAppointmentCtaUrl = gpBookAppointmentInterim ? '/home-loans/basics/appointment/' : '/book-appointment/';
|
|
3554
3594
|
var globalProps = utils$1.filterGlobalProps(props);
|
|
3555
3595
|
var handleClick = () => {
|
|
3556
3596
|
var event = {
|
|
@@ -3567,7 +3607,7 @@ var TalkToExpertButton = _ref => {
|
|
|
3567
3607
|
};
|
|
3568
3608
|
return /*#__PURE__*/jsxRuntime.jsx(Button.AnchorButton, _objectSpread2(_objectSpread2({
|
|
3569
3609
|
variant: "secondary",
|
|
3570
|
-
href: embedMarketingTrackingIntoURL(
|
|
3610
|
+
href: embedMarketingTrackingIntoURL(bookAppointmentCtaUrl, 'https://www.aussie.com.au'),
|
|
3571
3611
|
size: "sm",
|
|
3572
3612
|
"data-component": "navbar-button-talk-to-expert",
|
|
3573
3613
|
isInverse: true,
|
package/dist/navbar.cjs.prod.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
var React = require("react"), NavbarBase = require("@lendi-ui/navbar-base"), analytics$1 = require("@lendi/analytics"), breakpoint = require("@lendi-ui/breakpoint"), Logo = require("@lendi-ui/logo"), spacing = require("@lendi-ui/spacing"), Theme = require("@lendi/ui/Theme"), styled = require("styled-components"), jsxRuntime = require("react/jsx-runtime"), Alert = require("@lendi-ui/alert"), button = require("@lendi-ui/button"), UnreadMessage = require("@lendi-ui/icon/UnreadMessage"), utils = require("@lendi-ui/utils"), MoreVert = require("@lendi-ui/icon/MoreVert"), lalaUtils = require("@lendi/lala-utils"), launchdarkly = require("@lendi/launchdarkly"), borders = require("@lendi-ui/commons/borders"), getColour = require("@lendi-ui/commons/colours"), depth = require("@lendi-ui/depth"), Launch = require("@lendi-ui/icon/Launch"), typography = require("@lendi-ui/typography"), lalaReact = require("@lendi/lala-react"), chat = require("@lendi/chat"), Close = require("@lendi-ui/icon/Close"), color = require("@lendi-ui/color"), Face = require("@lendi-ui/icon/Face"), getTypography = require("@lendi-ui/commons/typography"), utils$1 = require("@lendi-ui/commons/utils"), Phone = require("@lendi-ui/icon/Phone"), Calendar = require("@lendi-ui/icon/Calendar"), lendigroupLeadsLibrary = require("@lendi/lendigroup-leads-library"), Chat = require("@lendi-ui/icon/Chat"), KeyboardArrowDown = require("@lendi-ui/icon/KeyboardArrowDown"), KeyboardArrowRight = require("@lendi-ui/icon/KeyboardArrowRight"), KeyboardArrowLeft = require("@lendi-ui/icon/KeyboardArrowLeft"), FocusLock = require("react-focus-lock"), Menu = require("@lendi-ui/icon/Menu"), Sidebar = require("@lendi-ui/sidebar"), ArrowDropDown = require("@lendi-ui/icon/ArrowDropDown"), ExitToApp = require("@lendi-ui/icon/ExitToApp"), ExpandMore = require("@lendi-ui/icon/ExpandMore"), grid = require("@lendi-ui/grid"), ChevronDown = require("@lendi-ui/icon/ChevronDown"), ChevronUp = require("@lendi-ui/icon/ChevronUp"), Layout = require("@lendi/ui/Layout"), ArrowForward = require("@lendi-ui/icon/ArrowForward"), Typography = require("@lendi/ui/Typography"), Button = require("@lendi/ui/Button"), axios = require("axios");
|
|
7
|
+
var React = require("react"), NavbarBase = require("@lendi-ui/navbar-base"), analytics$1 = require("@lendi/analytics"), breakpoint = require("@lendi-ui/breakpoint"), Logo = require("@lendi-ui/logo"), spacing = require("@lendi-ui/spacing"), Theme = require("@lendi/ui/Theme"), styled = require("styled-components"), jsxRuntime = require("react/jsx-runtime"), Alert = require("@lendi-ui/alert"), button = require("@lendi-ui/button"), UnreadMessage = require("@lendi-ui/icon/UnreadMessage"), utils = require("@lendi-ui/utils"), MoreVert = require("@lendi-ui/icon/MoreVert"), lalaUtils = require("@lendi/lala-utils"), launchdarkly = require("@lendi/launchdarkly"), borders = require("@lendi-ui/commons/borders"), getColour = require("@lendi-ui/commons/colours"), depth = require("@lendi-ui/depth"), Launch = require("@lendi-ui/icon/Launch"), typography = require("@lendi-ui/typography"), lalaReact = require("@lendi/lala-react"), chat = require("@lendi/chat"), Close = require("@lendi-ui/icon/Close"), color = require("@lendi-ui/color"), Face = require("@lendi-ui/icon/Face"), getTypography = require("@lendi-ui/commons/typography"), utils$1 = require("@lendi-ui/commons/utils"), Phone = require("@lendi-ui/icon/Phone"), Calendar = require("@lendi-ui/icon/Calendar"), lendigroupLeadsLibrary = require("@lendi/lendigroup-leads-library"), Chat = require("@lendi-ui/icon/Chat"), KeyboardArrowDown = require("@lendi-ui/icon/KeyboardArrowDown"), KeyboardArrowRight = require("@lendi-ui/icon/KeyboardArrowRight"), KeyboardArrowLeft = require("@lendi-ui/icon/KeyboardArrowLeft"), FocusLock = require("react-focus-lock"), icon = require("@lendi-ui/icon"), Menu = require("@lendi-ui/icon/Menu"), Sidebar = require("@lendi-ui/sidebar"), ArrowDropDown = require("@lendi-ui/icon/ArrowDropDown"), ExitToApp = require("@lendi-ui/icon/ExitToApp"), ExpandMore = require("@lendi-ui/icon/ExpandMore"), grid = require("@lendi-ui/grid"), ChevronDown = require("@lendi-ui/icon/ChevronDown"), ChevronUp = require("@lendi-ui/icon/ChevronUp"), Layout = require("@lendi/ui/Layout"), ArrowForward = require("@lendi-ui/icon/ArrowForward"), Typography = require("@lendi/ui/Typography"), Button = require("@lendi/ui/Button"), axios = require("axios");
|
|
8
8
|
|
|
9
9
|
function _interopDefault(e) {
|
|
10
10
|
return e && e.__esModule ? e : {
|
|
@@ -161,7 +161,7 @@ var _templateObject$f, _templateObject$e, _templateObject2$5, StyledHeaderLogo =
|
|
|
161
161
|
})([ "display:flex;align-items:center;" ]), NavbarLeftWrapper = styled__default.default.div.withConfig({
|
|
162
162
|
displayName: "styles__NavbarLeftWrapper",
|
|
163
163
|
componentId: "lui__sc-ej7i4l-3"
|
|
164
|
-
})([ "flex:1 0 auto;" ]), NavbarRightWrapper = styled__default.default.div.withConfig({
|
|
164
|
+
})([ "flex:1 0 auto;display:flex;align-items:center;gap:1rem;" ]), NavbarRightWrapper = styled__default.default.div.withConfig({
|
|
165
165
|
displayName: "styles__NavbarRightWrapper",
|
|
166
166
|
componentId: "lui__sc-ej7i4l-4"
|
|
167
167
|
})([ "" ]), AlertBanner = styled__default.default(Alert__default.default).withConfig({
|
|
@@ -1130,19 +1130,39 @@ var _templateObject$9, _templateObject2$4, _templateObject$8, _templateObject2$3
|
|
|
1130
1130
|
if (!url.match(FUNNEL1_URL_MATCH)) return unsetLenderIdInSessionStorage();
|
|
1131
1131
|
}
|
|
1132
1132
|
}), []);
|
|
1133
|
+
}, usePartnerBrand = () => {
|
|
1134
|
+
var [partnerId, setPartnerId] = React.useState(null);
|
|
1135
|
+
return React.useEffect((() => {
|
|
1136
|
+
if ("undefined" != typeof window && window.sessionStorage) {
|
|
1137
|
+
var partnerIdQuery = new URLSearchParams(window.location.search).get("partnerid");
|
|
1138
|
+
partnerIdQuery && (sessionStorage.setItem("GP_PARTNER_ID", partnerIdQuery), setPartnerId(partnerIdQuery));
|
|
1139
|
+
}
|
|
1140
|
+
var existingPartnerId = sessionStorage.getItem("GP_PARTNER_ID");
|
|
1141
|
+
existingPartnerId && setPartnerId(existingPartnerId);
|
|
1142
|
+
}), []), partnerId;
|
|
1133
1143
|
}, SimpleNavbarComponent = _ref => {
|
|
1134
|
-
var {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;
|
|
1135
|
-
|
|
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";
|
|
1145
|
+
useAHLParam();
|
|
1146
|
+
var partnerId = usePartnerBrand();
|
|
1147
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1136
1148
|
children: [ jsxRuntime.jsxs(NavbarWrapper, {
|
|
1137
1149
|
isTransparent: useTransparent,
|
|
1138
1150
|
isAuthenticated: isAuthenticated,
|
|
1139
|
-
children: [ jsxRuntime.
|
|
1140
|
-
children: jsxRuntime.jsx(LogoComponent$1, {
|
|
1151
|
+
children: [ jsxRuntime.jsxs(NavbarLeftWrapper, {
|
|
1152
|
+
children: [ jsxRuntime.jsx(LogoComponent$1, {
|
|
1141
1153
|
homeURL: homeURL,
|
|
1142
1154
|
params: params,
|
|
1143
1155
|
"aria-label": "Logo",
|
|
1144
1156
|
hasHamburgerMenu: !1
|
|
1145
|
-
})
|
|
1157
|
+
}), partnerId && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1158
|
+
children: [ jsxRuntime.jsx(icon.Close, {
|
|
1159
|
+
width: "24px",
|
|
1160
|
+
height: "24px"
|
|
1161
|
+
}), jsxRuntime.jsx("img", {
|
|
1162
|
+
src: "".concat(BASE_URL).concat("/growth-product-assets/partner-logos/").concat(partnerId, ".png"),
|
|
1163
|
+
alt: "Partner Logo"
|
|
1164
|
+
}) ]
|
|
1165
|
+
}) ]
|
|
1146
1166
|
}), jsxRuntime.jsx(NavbarRightWrapper, {
|
|
1147
1167
|
children: jsxRuntime.jsx(DropdownProvider, {
|
|
1148
1168
|
hideDashboardItem: hideDashboardItem,
|
|
@@ -2326,10 +2346,10 @@ var _templateObject$3, _templateObject2$1, _templateObject$2, _templateObject$1,
|
|
|
2326
2346
|
}) ]
|
|
2327
2347
|
}));
|
|
2328
2348
|
}, _excluded$3 = [ "talkTo" ], TalkToExpertButton = _ref => {
|
|
2329
|
-
var {talkTo: talkTo} = _ref, props = _objectWithoutProperties(_ref, _excluded$3), {store: store, broker: broker} = chat.useBootstrappedChatState(), globalProps = utils$1.filterGlobalProps(props);
|
|
2349
|
+
var {talkTo: talkTo} = _ref, props = _objectWithoutProperties(_ref, _excluded$3), {store: store, broker: broker} = chat.useBootstrappedChatState(), {gpBookAppointmentInterim: gpBookAppointmentInterim} = launchdarkly.useFlags(), bookAppointmentCtaUrl = gpBookAppointmentInterim ? "/home-loans/basics/appointment/" : "/book-appointment/", globalProps = utils$1.filterGlobalProps(props);
|
|
2330
2350
|
return jsxRuntime.jsx(Button.AnchorButton, _objectSpread2(_objectSpread2({
|
|
2331
2351
|
variant: "secondary",
|
|
2332
|
-
href: embedMarketingTrackingIntoURL(
|
|
2352
|
+
href: embedMarketingTrackingIntoURL(bookAppointmentCtaUrl, "https://www.aussie.com.au"),
|
|
2333
2353
|
size: "sm",
|
|
2334
2354
|
"data-component": "navbar-button-talk-to-expert",
|
|
2335
2355
|
isInverse: !0,
|
package/dist/navbar.esm.js
CHANGED
|
@@ -12,7 +12,7 @@ import { Button, IconButton } from '@lendi-ui/button';
|
|
|
12
12
|
import UnreadMessage from '@lendi-ui/icon/UnreadMessage';
|
|
13
13
|
import { display, normalise, deriveSize } from '@lendi-ui/utils';
|
|
14
14
|
import MoreVert from '@lendi-ui/icon/MoreVert';
|
|
15
|
-
import { getBrandFromHostname, Brand, getURLs, SESSION_STORAGE_KEYS, getAPIBaseURL } from '@lendi/lala-utils';
|
|
15
|
+
import { getBrandFromHostname, Brand, getURLs, SESSION_STORAGE_KEYS, Environment as Environment$1, getAPIBaseURL } from '@lendi/lala-utils';
|
|
16
16
|
import { useFlags, withLendiLDProvider } from '@lendi/launchdarkly';
|
|
17
17
|
import { getRadius, getFocusRing } from '@lendi-ui/commons/borders';
|
|
18
18
|
import getColour, { getColour as getColour$1 } from '@lendi-ui/commons/colours';
|
|
@@ -35,6 +35,7 @@ import KeyboardArrowDown from '@lendi-ui/icon/KeyboardArrowDown';
|
|
|
35
35
|
import KeyboardArrowRight from '@lendi-ui/icon/KeyboardArrowRight';
|
|
36
36
|
import KeyboardArrowLeft from '@lendi-ui/icon/KeyboardArrowLeft';
|
|
37
37
|
import FocusLock from 'react-focus-lock';
|
|
38
|
+
import { Close as Close$1 } from '@lendi-ui/icon';
|
|
38
39
|
import Menu from '@lendi-ui/icon/Menu';
|
|
39
40
|
import Sidebar from '@lendi-ui/sidebar';
|
|
40
41
|
import ArrowDropDown from '@lendi-ui/icon/ArrowDropDown';
|
|
@@ -246,7 +247,7 @@ var MenuLogoWrapper = styled.div.withConfig({
|
|
|
246
247
|
var NavbarLeftWrapper = styled.div.withConfig({
|
|
247
248
|
displayName: "styles__NavbarLeftWrapper",
|
|
248
249
|
componentId: "lui__sc-ej7i4l-3"
|
|
249
|
-
})(["flex:1 0 auto;"]);
|
|
250
|
+
})(["flex:1 0 auto;display:flex;align-items:center;gap:1rem;"]);
|
|
250
251
|
var NavbarRightWrapper = styled.div.withConfig({
|
|
251
252
|
displayName: "styles__NavbarRightWrapper",
|
|
252
253
|
componentId: "lui__sc-ej7i4l-4"
|
|
@@ -1786,8 +1787,31 @@ var useAHLParam = () => {
|
|
|
1786
1787
|
}, []);
|
|
1787
1788
|
};
|
|
1788
1789
|
|
|
1790
|
+
var usePartnerBrand = () => {
|
|
1791
|
+
var [partnerId, setPartnerId] = useState(null);
|
|
1792
|
+
useEffect(() => {
|
|
1793
|
+
if (typeof window !== 'undefined' && window.sessionStorage) {
|
|
1794
|
+
// First, check URL params
|
|
1795
|
+
var urlParams = new URLSearchParams(window.location.search);
|
|
1796
|
+
var partnerIdQuery = urlParams.get('partnerid');
|
|
1797
|
+
if (partnerIdQuery) {
|
|
1798
|
+
sessionStorage.setItem('GP_PARTNER_ID', partnerIdQuery);
|
|
1799
|
+
setPartnerId(partnerIdQuery);
|
|
1800
|
+
}
|
|
1801
|
+
}
|
|
1802
|
+
// If not, check if we already have a partner ID in session storage
|
|
1803
|
+
var existingPartnerId = sessionStorage.getItem('GP_PARTNER_ID');
|
|
1804
|
+
if (existingPartnerId) {
|
|
1805
|
+
setPartnerId(existingPartnerId);
|
|
1806
|
+
return;
|
|
1807
|
+
}
|
|
1808
|
+
}, []);
|
|
1809
|
+
return partnerId;
|
|
1810
|
+
};
|
|
1811
|
+
|
|
1789
1812
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1790
1813
|
var SimpleNavbarComponent = _ref => {
|
|
1814
|
+
var _window;
|
|
1791
1815
|
var {
|
|
1792
1816
|
// Public props
|
|
1793
1817
|
useTransparent = false,
|
|
@@ -1812,20 +1836,32 @@ var SimpleNavbarComponent = _ref => {
|
|
|
1812
1836
|
} = useFlags();
|
|
1813
1837
|
var session = useSession();
|
|
1814
1838
|
var isAuthenticated = session.status === Status.Authenticated;
|
|
1815
|
-
|
|
1839
|
+
// Set to aussie domain for either brands
|
|
1840
|
+
var env = getEnvFromHostname((_window = window) === null || _window === void 0 || (_window = _window.location) === null || _window === void 0 ? void 0 : _window.hostname);
|
|
1841
|
+
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";
|
|
1842
|
+
var PARTNER_LOGO_BASE_PATH = '/growth-product-assets/partner-logos/';
|
|
1816
1843
|
// to set AHL value in session storage for funnel1 journey
|
|
1817
1844
|
useAHLParam();
|
|
1845
|
+
var partnerId = usePartnerBrand();
|
|
1818
1846
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
1819
1847
|
children: [/*#__PURE__*/jsxs(NavbarWrapper, {
|
|
1820
1848
|
isTransparent: useTransparent,
|
|
1821
1849
|
isAuthenticated: isAuthenticated,
|
|
1822
|
-
children: [/*#__PURE__*/
|
|
1823
|
-
children: /*#__PURE__*/jsx(LogoComponent$1, {
|
|
1850
|
+
children: [/*#__PURE__*/jsxs(NavbarLeftWrapper, {
|
|
1851
|
+
children: [/*#__PURE__*/jsx(LogoComponent$1, {
|
|
1824
1852
|
homeURL: homeURL,
|
|
1825
1853
|
params: params,
|
|
1826
1854
|
"aria-label": "Logo",
|
|
1827
1855
|
hasHamburgerMenu: false
|
|
1828
|
-
})
|
|
1856
|
+
}), partnerId && /*#__PURE__*/jsxs(Fragment, {
|
|
1857
|
+
children: [/*#__PURE__*/jsx(Close$1, {
|
|
1858
|
+
width: "24px",
|
|
1859
|
+
height: "24px"
|
|
1860
|
+
}), /*#__PURE__*/jsx("img", {
|
|
1861
|
+
src: "".concat(BASE_URL).concat(PARTNER_LOGO_BASE_PATH).concat(partnerId, ".png"),
|
|
1862
|
+
alt: "Partner Logo"
|
|
1863
|
+
})]
|
|
1864
|
+
})]
|
|
1829
1865
|
}), /*#__PURE__*/jsx(NavbarRightWrapper, {
|
|
1830
1866
|
children: /*#__PURE__*/jsx(DropdownProvider, {
|
|
1831
1867
|
hideDashboardItem: hideDashboardItem,
|
|
@@ -3517,6 +3553,10 @@ var TalkToExpertButton = _ref => {
|
|
|
3517
3553
|
store,
|
|
3518
3554
|
broker
|
|
3519
3555
|
} = useBootstrappedChatState();
|
|
3556
|
+
var {
|
|
3557
|
+
gpBookAppointmentInterim
|
|
3558
|
+
} = useFlags();
|
|
3559
|
+
var bookAppointmentCtaUrl = gpBookAppointmentInterim ? '/home-loans/basics/appointment/' : '/book-appointment/';
|
|
3520
3560
|
var globalProps = filterGlobalProps(props);
|
|
3521
3561
|
var handleClick = () => {
|
|
3522
3562
|
var event = {
|
|
@@ -3533,7 +3573,7 @@ var TalkToExpertButton = _ref => {
|
|
|
3533
3573
|
};
|
|
3534
3574
|
return /*#__PURE__*/jsx(AnchorButton, _objectSpread2(_objectSpread2({
|
|
3535
3575
|
variant: "secondary",
|
|
3536
|
-
href: embedMarketingTrackingIntoURL(
|
|
3576
|
+
href: embedMarketingTrackingIntoURL(bookAppointmentCtaUrl, 'https://www.aussie.com.au'),
|
|
3537
3577
|
size: "sm",
|
|
3538
3578
|
"data-component": "navbar-button-talk-to-expert",
|
|
3539
3579
|
isInverse: true,
|