fix: sort posts mby most recent
This commit is contained in:
parent
fecac748b4
commit
6b74e0b5c7
1 changed files with 1 additions and 1 deletions
|
|
@ -8,5 +8,5 @@ export const sortItem = (a, b) => {
|
||||||
const aDate = parseEuroDate(a.data.date).getTime();
|
const aDate = parseEuroDate(a.data.date).getTime();
|
||||||
const bDate = parseEuroDate(b.data.date).getTime();
|
const bDate = parseEuroDate(b.data.date).getTime();
|
||||||
|
|
||||||
return aDate === bDate ? a.slug.localeCompare(b.slug) : bDate - aDate;
|
return aDate === bDate ? b.slug.localeCompare(a.slug) : bDate - aDate;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue