feature/IO-3255-simplified-parts-management - Cleanup
This commit is contained in:
@@ -13,6 +13,7 @@ import NotFound from "../../components/not-found/not-found.component";
|
||||
import InstanceRenderManager from "../../utils/instanceRenderMgr";
|
||||
import { selectIsPartsEntry } from "../../redux/application/application.selectors";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import getPartsBasePath from "../../utils/getPartsBasePath.js";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
isPartsEntry: selectIsPartsEntry
|
||||
@@ -27,7 +28,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
export function VehicleDetailContainer({ setBreadcrumbs, addRecentItem, setSelectedHeader, isPartsEntry }) {
|
||||
const { vehId } = useParams();
|
||||
const { t } = useTranslation();
|
||||
const basePath = isPartsEntry ? "/parts" : "/manage";
|
||||
const basePath = getPartsBasePath(isPartsEntry);
|
||||
|
||||
const { loading, data, error, refetch } = useQuery(QUERY_VEHICLE_BY_ID, {
|
||||
variables: { id: vehId },
|
||||
|
||||
@@ -7,6 +7,7 @@ import InstanceRenderManager from "../../utils/instanceRenderMgr";
|
||||
import { setBreadcrumbs, setSelectedHeader } from "../../redux/application/application.actions";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectIsPartsEntry } from "../../redux/application/application.selectors.js";
|
||||
import getPartsBasePath from "../../utils/getPartsBasePath.js";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
isPartsEntry: selectIsPartsEntry
|
||||
@@ -19,7 +20,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
export function VehiclesPageContainer({ setBreadcrumbs, setSelectedHeader, isPartsEntry }) {
|
||||
const { t } = useTranslation();
|
||||
const basePath = isPartsEntry ? "/parts" : "/manage";
|
||||
const basePath = getPartsBasePath(isPartsEntry);
|
||||
|
||||
useEffect(() => {
|
||||
document.title = t("titles.vehicles", {
|
||||
|
||||
Reference in New Issue
Block a user