Develop#655
Merged
Merged
Conversation
…rting method causing blank cards to appear at the top of the page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates several dependencies in the client application to address security, compatibility, and feature improvements. It also modernizes the Axios request cancellation approach and enhances the image feed sorting behavior in the UI.
Dependency Updates:
Upgraded several key dependencies in
package.jsonandpackage-lock.json, includingaxios(from0.27.2to1.17.0),lodash/lodash-es(from4.17.xto4.18.1),react-routerandreact-router-dom(from6.30.1to6.30.4), and others. These upgrades improve security, performance, and compatibility. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]Added new dependencies required by updated packages, such as
agent-base,https-proxy-agent, andproxy-from-env. [1] [2] [3]Axios Request Cancellation Modernization:
axios.CancelTokenwith the modernAbortControllerAPI for request cancellation, updating both the controller and how the signal is attached to requests.Image Feed Sorting and Randomization Improvements:
Added a
sortKeystate to theImageFeedcomponent and updated the key for theImageCardscomponent to include bothrandomizeKeyandsortKey. This ensures the image cards properly re-render when sorting or randomizing, preventing stale UI. [1] [2]Enhanced the
handleSortChangefunction to incrementsortKeyand scroll to the top of the page when sorting changes, improving user experience.