feature/IO-3499-React-19: Bug Fixes / Checkpoint
This commit is contained in:
@@ -31,6 +31,14 @@ const VehiclesContainer = lazy(() => import("../vehicles/vehicles.page.container
|
||||
const VehiclesDetailContainer = lazy(() => import("../vehicles-detail/vehicles-detail.page.container.jsx"));
|
||||
const { Content } = Layout;
|
||||
|
||||
// Redirector to strip '/parts/jobs' from path for non-detail routes
|
||||
function JobsStripRedirect() {
|
||||
const location = useLocation();
|
||||
const { pathname, search, hash } = location;
|
||||
const target = pathname.replace("/parts/jobs", "/parts") + (search || "") + (hash || "");
|
||||
return <Navigate to={target} replace />;
|
||||
}
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
conflict: selectInstanceConflict,
|
||||
bodyshop: selectBodyshop
|
||||
@@ -39,15 +47,6 @@ const mapStateToProps = createStructuredSelector({
|
||||
export function SimplifiedPartsPage({ conflict, bodyshop }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
// Redirector to strip '/parts/jobs' from path for non-detail routes
|
||||
function JobsStripRedirect() {
|
||||
// lazy import to avoid top-level import churn
|
||||
const location = useLocation();
|
||||
const { pathname, search, hash } = location;
|
||||
const target = pathname.replace("/parts/jobs", "/parts") + (search || "") + (hash || "");
|
||||
return <Navigate to={target} replace />;
|
||||
}
|
||||
|
||||
// Centralized alerts handling (fetch + dedupe + notifications)
|
||||
useAlertsNotifications();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user