+2
-2
src/blog.ts
+2
-2
src/blog.ts
···
9
9
}).then((data: { records: Array<{ uri: string, value: { title: string, createdAt: string } }> }) => {
10
10
const sortedRecords = data.records.sort((n1, n2) => {
11
11
if (new Date(n1.value.createdAt) > new Date(n2.value.createdAt)) {
12
-
return 1;
12
+
return -1;
13
13
}
14
14
15
15
if (new Date(n1.value.createdAt) < new Date(n2.value.createdAt)) {
16
-
return -1;
16
+
return 1;
17
17
}
18
18
19
19
return 0;