Skip to content

Commit

Permalink
fix: issuance view
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D committed Mar 13, 2024
1 parent 68d77ba commit 262a3d4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/components/blocks/DetailedViewIssuanceUnitTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,13 @@ const DetailedViewIssuanceUnitTable = ({ issuance }) => {
]);

useEffect(() => {
dispatch(getUnits({ useMockedResponse: false, useApiMock: false }));
dispatch(
getUnits({
additionalQuery: `orgUid=${issuance.orgUid}`,
useMockedResponse: false,
useApiMock: false,
}),
);
}, []);

const handleChangePage = (event, newPage) => {
Expand Down
6 changes: 4 additions & 2 deletions src/store/actions/climateWarehouseActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2491,8 +2491,10 @@ export const mockUnitsResponse = {

export const getUnits = options => {
const url = options?.searchQuery
? `${constants.API_HOST}/units?page=1&limit=10&search=${options.searchQuery}`
: `${constants.API_HOST}/units?page=1&limit=10&`;
? `${constants.API_HOST}/units?page=1&limit=100&search=${options.searchQuery}`
: `${constants.API_HOST}/units?page=1&limit=100&${
options?.additionalQuery || ''
}`;

return dispatch => {
dispatch(
Expand Down

0 comments on commit 262a3d4

Please sign in to comment.