FIXES full screen leaderboard out of order when webhook returns new data #757
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 commit centralizes the leaderboard sorting logic within the useEffect hooks in the ScuntLeaderboard component. Previously, sorting was redundantly applied in individual child components.
Contribution:
Changes include:
-Prop Passing: Updated the ScuntLeaderboardShow component to correctly pass down the sorted leaderboard data to its child components.
These updates enhance the maintainability and consistency of the leaderboard's order across the application.
Issue:
When leaderboard full screen, teams are ordered based on points but as soon as the leaderboard data gets updated via webhook, the order is no longer retained
Closes #571
Accomplishments:
Consistency Across Components: By centralizing the sorting logic, we've ensured that all components reflect a consistent order of the leaderboard data.
Reduced Redundancy: Eliminated redundant sorting in child components, thereby simplifying the codebase and enhancing maintainability.
Resolved Issue #571: Addressed the main concern of the leaderboard order getting disrupted upon receiving new data, ensuring a seamless and consistent user experience.