feature/IO-3255-simplified-parts-management - Cleanup
This commit is contained in:
@@ -8,6 +8,7 @@ import { pageLimit } from "../../utils/config";
|
||||
import { connect } from "react-redux";
|
||||
import { selectIsPartsEntry } from "../../redux/application/application.selectors";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import getPartsBasePath from "../../utils/getPartsBasePath.js";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
isPartsEntry: selectIsPartsEntry
|
||||
@@ -16,7 +17,7 @@ const mapStateToProps = createStructuredSelector({
|
||||
export function VehiclesListContainer({ isPartsEntry }) {
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { page, sortcolumn, sortorder, search } = searchParams;
|
||||
const basePath = isPartsEntry ? "/parts" : "/manage";
|
||||
const basePath = getPartsBasePath(isPartsEntry);
|
||||
|
||||
const { loading, error, data, refetch } = useQuery(QUERY_ALL_VEHICLES_PAGINATED, {
|
||||
variables: {
|
||||
|
||||
Reference in New Issue
Block a user