Skip to content

Commit

Permalink
Removing unnecessary sorting of achievements in the list (might be re…
Browse files Browse the repository at this point in the history
…turned later)
  • Loading branch information
kryvyifedir committed Mar 2, 2024
1 parent 73a8280 commit 1502a1d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ <h2 class="slds-card__header-title">
<template lwc:elseif={showAchievements}>
<div class="slds-card__body slds-card__body_inner slds-box slds-var-m-around_small"
style="height: 83%; overflow: scroll;">
<c-achievements-list achievements={achievementsByDate} is-loading={isLoadingAchievements}></c-achievements-list>
<c-achievements-list achievements={achievements} is-loading={isLoadingAchievements}></c-achievements-list>
</div>
</template>
<template lwc:elseif={showEmpty}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,6 @@ export default class CurrentUserAchievements extends LightningElement {
}
}

get achievementsByDate() {
let returnValue = [];
if (this.achievements) {
returnValue = [...this.achievements].sort((a, b) => { return b.reachedDate - a.reachedDate });
}

return returnValue;
}

get showAchievements() {
return this.achievements && this.achievements.length > 0
}
Expand Down

0 comments on commit 1502a1d

Please sign in to comment.