@boomerang-io/carbon-addons-boomerang-react 4.6.21-beta.2 → 4.6.21-beta.4
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.
|
@@ -38,6 +38,7 @@ function AdvantageSideNav(props) {
|
|
|
38
38
|
const [activeMenu, setActiveMenu] = React__default.default.useState(false);
|
|
39
39
|
const isMenuOpen = isOpen || activeMenu;
|
|
40
40
|
const windowLocation = window.location;
|
|
41
|
+
const location = reactRouterDom.useLocation();
|
|
41
42
|
const isPartnerUser = user?.type === UserType.USER_PLATFORM_ROLE.Partner;
|
|
42
43
|
const joinButtontitle = showSelectTeamPurpose ? "Create Team" : "Create or Join Team";
|
|
43
44
|
const hamburguerMenu = document.getElementById("header-sidenav-menu-button");
|
|
@@ -229,13 +230,18 @@ function AdvantageSideNav(props) {
|
|
|
229
230
|
handleDocumentCollectionsClick();
|
|
230
231
|
} }, "Document Collections")) : null,
|
|
231
232
|
showSecondDivider ? React__default.default.createElement(react.SideNavDivider, null) : null,
|
|
232
|
-
catalogNavlink ? (React__default.default.createElement("
|
|
233
|
-
"
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
233
|
+
catalogNavlink ? (React__default.default.createElement(reactRouterDom.Link, { to: catalogNavlink, style: { textDecoration: "none" } },
|
|
234
|
+
React__default.default.createElement(react.SideNavLink, { "data-testid": "sidenav-catalog-link", isActive: location.pathname.includes("/catalog"), renderIcon: icons.Catalog }, "Catalog"))
|
|
235
|
+
// <SideNavLink
|
|
236
|
+
// to={catalogNavlink}
|
|
237
|
+
// data-testid="sidenav-catalog-link"
|
|
238
|
+
// isActive={windowLocation.href.includes(`${baseEnvUrl}/catalog`)}
|
|
239
|
+
// // href={catalogNavlink}
|
|
240
|
+
// renderIcon={Catalog}
|
|
241
|
+
// >
|
|
242
|
+
// Catalog
|
|
243
|
+
// </SideNavLink>
|
|
244
|
+
) : null,
|
|
239
245
|
settingsLink ? (React__default.default.createElement(react.SideNavLink, { "data-testid": "sidenav-settings-link", renderIcon: icons.Settings, href: settingsLink, onClick: (e) => {
|
|
240
246
|
handleSettingsClick();
|
|
241
247
|
} }, "Settings")) : null,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Link } from 'react-router-dom';
|
|
2
|
+
import { useLocation, Link } from 'react-router-dom';
|
|
3
3
|
import cx from 'classnames';
|
|
4
4
|
import { SideNavLink, SideNav, SideNavItems, SideNavDivider, Tag } from '@carbon/react';
|
|
5
5
|
import TooltipHover from '../TooltipHover/TooltipHover.js';
|
|
@@ -29,6 +29,7 @@ function AdvantageSideNav(props) {
|
|
|
29
29
|
const [activeMenu, setActiveMenu] = React.useState(false);
|
|
30
30
|
const isMenuOpen = isOpen || activeMenu;
|
|
31
31
|
const windowLocation = window.location;
|
|
32
|
+
const location = useLocation();
|
|
32
33
|
const isPartnerUser = user?.type === USER_PLATFORM_ROLE.Partner;
|
|
33
34
|
const joinButtontitle = showSelectTeamPurpose ? "Create Team" : "Create or Join Team";
|
|
34
35
|
const hamburguerMenu = document.getElementById("header-sidenav-menu-button");
|
|
@@ -220,13 +221,18 @@ function AdvantageSideNav(props) {
|
|
|
220
221
|
handleDocumentCollectionsClick();
|
|
221
222
|
} }, "Document Collections")) : null,
|
|
222
223
|
showSecondDivider ? React.createElement(SideNavDivider, null) : null,
|
|
223
|
-
catalogNavlink ? (React.createElement("
|
|
224
|
-
"
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
224
|
+
catalogNavlink ? (React.createElement(Link, { to: catalogNavlink, style: { textDecoration: "none" } },
|
|
225
|
+
React.createElement(SideNavLink, { "data-testid": "sidenav-catalog-link", isActive: location.pathname.includes("/catalog"), renderIcon: Catalog }, "Catalog"))
|
|
226
|
+
// <SideNavLink
|
|
227
|
+
// to={catalogNavlink}
|
|
228
|
+
// data-testid="sidenav-catalog-link"
|
|
229
|
+
// isActive={windowLocation.href.includes(`${baseEnvUrl}/catalog`)}
|
|
230
|
+
// // href={catalogNavlink}
|
|
231
|
+
// renderIcon={Catalog}
|
|
232
|
+
// >
|
|
233
|
+
// Catalog
|
|
234
|
+
// </SideNavLink>
|
|
235
|
+
) : null,
|
|
230
236
|
settingsLink ? (React.createElement(SideNavLink, { "data-testid": "sidenav-settings-link", renderIcon: Settings, href: settingsLink, onClick: (e) => {
|
|
231
237
|
handleSettingsClick();
|
|
232
238
|
} }, "Settings")) : null,
|
package/package.json
CHANGED