Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GooDeene committed Jun 1, 2024
1 parent a95f9cd commit fa3e6a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hooks/pages/use-offer-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ export function useOfferPage() {
}
}, [id, dispatch]);

return {currentOffer, nearbyPoints, nearbyOffers};
return {currentOffer, nearbyPoints, nearbyOffers: nearbyOffers.length >= 3 ? nearbyOffers.slice(0, 3) : nearbyOffers};
}
2 changes: 1 addition & 1 deletion src/services/error-handle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export type DetailMessageType = {

const StatusCodeMapping: Record<number, boolean> = {
[StatusCodes.BAD_REQUEST]: true,
[StatusCodes.UNAUTHORIZED]: true,
[StatusCodes.UNAUTHORIZED]: false,
[StatusCodes.NOT_FOUND]: true
};

Expand Down

0 comments on commit fa3e6a0

Please sign in to comment.