Skip to content

Commit

Permalink
TNO-2001 Reverse sort time
Browse files Browse the repository at this point in the history
  • Loading branch information
fbarreta committed Feb 7, 2024
1 parent 25bfdc1 commit 1da99e9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const sortFunc = (key: string) => {
switch (key) {
case 'published':
return (a: IContentSearchResult, b: IContentSearchResult) =>
a.publishedOn > b.publishedOn ? 1 : -1;
a.publishedOn < b.publishedOn ? 1 : -1;
case 'source':
return (a: IContentSearchResult, b: IContentSearchResult) => {
if (a.source && b.source) {
Expand All @@ -17,7 +17,7 @@ const sortFunc = (key: string) => {
};
default:
return (a: IContentSearchResult, b: IContentSearchResult) =>
a.publishedOn > b.publishedOn ? 1 : -1;
a.publishedOn < b.publishedOn ? 1 : -1;
}
};

Expand Down

0 comments on commit 1da99e9

Please sign in to comment.