Added selected header navigation BOD-164
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user