Added selected header navigation BOD-164

This commit is contained in:
Patrick Fic
2020-09-09 11:57:58 -07:00
parent 637670da50
commit eff6f361ee
31 changed files with 309 additions and 76 deletions

View File

@@ -26,7 +26,10 @@ import {
import { connect } from "react-redux";
import { Link } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import { selectRecentItems } from "../../redux/application/application.selectors";
import {
selectRecentItems,
selectSelectedHeader,
} from "../../redux/application/application.selectors";
import { setModalContext } from "../../redux/modals/modals.actions";
import { signOutStart } from "../../redux/user/user.actions";
import { selectCurrentUser } from "../../redux/user/user.selectors";
@@ -36,6 +39,7 @@ import "./header.styles.scss";
const mapStateToProps = createStructuredSelector({
currentUser: selectCurrentUser,
recentItems: selectRecentItems,
selectedHeader: selectSelectedHeader,
});
const mapDispatchToProps = (dispatch) => ({
@@ -51,6 +55,7 @@ const mapDispatchToProps = (dispatch) => ({
function Header({
handleMenuClick,
currentUser,
selectedHeader,
signOutStart,
setInvoiceEnterContext,
setTimeTicketContext,
@@ -64,7 +69,7 @@ function Header({
mode="horizontal"
theme="dark"
className="header-main-menu"
selectedKeys={["home"]}
selectedKeys={[selectedHeader]}
onClick={handleMenuClick}
>
<Menu.Item key="home">