@axos-web-dev/shared-components 0.0.77 → 0.0.78
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.
|
@@ -11,7 +11,7 @@ import "../../icons/CheckIcon/CheckIcon.css.js";
|
|
|
11
11
|
import "../../Chevron/Chevron.css.js";
|
|
12
12
|
import "../../AlertBanner/AlertBanner.css.js";
|
|
13
13
|
import "../../Button/Button.css.js";
|
|
14
|
-
import { useState } from "react";
|
|
14
|
+
import { useState, useEffect } from "react";
|
|
15
15
|
import "../../ApyCalculator/ApyCalculator.css.js";
|
|
16
16
|
import "../../Modal/contextApi/store.js";
|
|
17
17
|
import { findMoreAxosDomains } from "../../utils/allowedAxosDomains.js";
|
|
@@ -88,18 +88,21 @@ function SubNavBar() {
|
|
|
88
88
|
const handleMouseEnter = (link) => setHoveredLink(link);
|
|
89
89
|
const handleMouseLeave = () => setHoveredLink(void 0);
|
|
90
90
|
const hideOnClick = () => setHoveredLink(void 0);
|
|
91
|
+
const [showNavbar, setShowNavbar] = useState(false);
|
|
91
92
|
const support = subNavItems.support;
|
|
92
93
|
const about = subNavItems.about;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
94
|
+
useEffect(() => {
|
|
95
|
+
setShowNavbar(
|
|
96
|
+
() => [
|
|
97
|
+
"/personal",
|
|
98
|
+
"/business",
|
|
99
|
+
"/partners",
|
|
100
|
+
"/customer-suppor",
|
|
101
|
+
"/about-us"
|
|
102
|
+
].some((el) => pathname?.includes(el))
|
|
103
|
+
);
|
|
104
|
+
}, [pathname]);
|
|
105
|
+
return showNavbar ? /* @__PURE__ */ jsx("div", { className: `${styles.sub_nav} ${sub_nav} ${styles.desktop_only}`, children: /* @__PURE__ */ jsx("div", { className: styles.wrapper, children: /* @__PURE__ */ jsxs("div", { className: styles.header_sub_row, children: [
|
|
103
106
|
/* @__PURE__ */ jsx("nav", { children: /* @__PURE__ */ jsxs("ul", { className: "list_unstyled flex_row middle", children: [
|
|
104
107
|
pathname?.includes("/personal") && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
105
108
|
/* @__PURE__ */ jsx("li", { className: styles.sub_nav_link, children: /* @__PURE__ */ jsxs(
|
|
@@ -2900,7 +2903,7 @@ function SubNavBar() {
|
|
|
2900
2903
|
] }) })
|
|
2901
2904
|
}
|
|
2902
2905
|
)
|
|
2903
|
-
] }) }) });
|
|
2906
|
+
] }) }) }) : null;
|
|
2904
2907
|
}
|
|
2905
2908
|
export {
|
|
2906
2909
|
SubNavBar as default
|