@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
- if (![
94
- "/personal",
95
- "/business",
96
- "/partners",
97
- "/customer-suppor",
98
- "/about-us"
99
- ].some((el) => pathname?.includes(el))) {
100
- return null;
101
- }
102
- return /* @__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: [
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
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@axos-web-dev/shared-components",
3
3
  "description": "Axos shared components library for web.",
4
- "version": "0.0.77",
4
+ "version": "0.0.78",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",