Skip to content

Commit

Permalink
fix: resolved workspace sorting with time/[#1923]
Browse files Browse the repository at this point in the history
  • Loading branch information
aakashreddy-p committed Dec 23, 2024
1 parent 7a6f2e2 commit 8493c89
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@
typeof item.name === "string" &&
item.name.toLowerCase().includes(searchQuery.toLowerCase()),
)
.sort((a, b) => a.name.localeCompare(b.name)); // will arrange workspace aplhabetically
.sort(
(a, b) =>
new Date(b._data.updatedAt).getTime() -
new Date(a._data.updatedAt).getTime(),
);
// This will split workspaces into pages
$: paginatedWorkspaces = (() => {
Expand Down

0 comments on commit 8493c89

Please sign in to comment.