Skip to content

Commit ddffb9d

Browse files
committed
Continue fixing sorting
1 parent 11a7e5f commit ddffb9d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Diff for: src/App/App_containers/PageContainer/CollectionsPage/CollectionComponent.jsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ const CollectionComponent = ({ collection, actions, data }) => {
5656
})
5757
.catch((e) => console.error(e));
5858
if (data.collection === "MeasureOfDays") {
59-
const sortedList = collectionList.slice();
60-
console.log(sortedList)
61-
sortedList.sort((a,b) => {
59+
const sortedList = collectionList.sort((a,b) => {
6260
let result;
6361
if (a.date < b.date) {
6462
result = -1;
@@ -67,7 +65,7 @@ const CollectionComponent = ({ collection, actions, data }) => {
6765
}
6866
return result;
6967
})
70-
console.log(collectionList)
68+
console.log(sortedList)
7169
sortedList.forEach((image) => {
7270
image.src["300"].then((source) => {
7371
setImageList((prevState) => [

0 commit comments

Comments
 (0)