mirror of
https://github.com/xHyroM/website.git
synced 2024-11-22 06:51:05 +01:00
feat(pages): sort projects by alphabet
This commit is contained in:
parent
00325005cc
commit
e634f07d3e
1 changed files with 1 additions and 5 deletions
|
@ -10,7 +10,6 @@ interface Project {
|
|||
stats?: {
|
||||
forks: number;
|
||||
stars: number;
|
||||
updated_at: Date;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -99,13 +98,10 @@ for (const project of projects) {
|
|||
project.stats = {
|
||||
forks: repository.forks,
|
||||
stars: repository.stargazers_count,
|
||||
updated_at: new Date(repository.updated_at),
|
||||
};
|
||||
}
|
||||
|
||||
projects.sort(
|
||||
(a, b) => b.stats!.updated_at.getTime() - a.stats!.updated_at.getTime()
|
||||
);
|
||||
projects.sort((a, b) => a.name.localeCompare(b.name));
|
||||
---
|
||||
|
||||
<Layout
|
||||
|
|
Loading…
Reference in a new issue