feature/IO-3255-simplified-parts-management - Favor isPartsEntry over isPartsManagementOnly
This commit is contained in:
@@ -4,7 +4,7 @@ import { selectBreadcrumbs, selectIsPartsEntry } from "../../redux/application/a
|
||||
import { connect } from "react-redux";
|
||||
import { Link } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectBodyshop, selectPartsManagementOnly } from "../../redux/user/user.selectors";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import GlobalSearch from "../global-search/global-search.component";
|
||||
import GlobalSearchOs from "../global-search/global-search-os.component";
|
||||
import "./breadcrumbs.styles.scss";
|
||||
@@ -13,11 +13,10 @@ import { useSplitTreatments } from "@splitsoftware/splitio-react";
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
breadcrumbs: selectBreadcrumbs,
|
||||
bodyshop: selectBodyshop,
|
||||
partsManagementOnly: selectPartsManagementOnly,
|
||||
isPartsEntry: selectIsPartsEntry
|
||||
});
|
||||
|
||||
export function BreadCrumbs({ breadcrumbs, bodyshop, partsManagementOnly, isPartsEntry }) {
|
||||
export function BreadCrumbs({ breadcrumbs, bodyshop, isPartsEntry }) {
|
||||
const {
|
||||
treatments: { OpenSearch }
|
||||
} = useSplitTreatments({
|
||||
@@ -35,7 +34,7 @@ export function BreadCrumbs({ breadcrumbs, bodyshop, partsManagementOnly, isPart
|
||||
{
|
||||
key: "home",
|
||||
title: (
|
||||
<Link to={partsManagementOnly || isPartsEntry ? `/parts/` : `/manage/`}>
|
||||
<Link to={isPartsEntry ? `/parts/` : `/manage/`}>
|
||||
<HomeFilled /> {(bodyshop && bodyshop.shopname && `(${bodyshop.shopname})`) || ""}
|
||||
</Link>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user