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?: {
|
stats?: {
|
||||||
forks: number;
|
forks: number;
|
||||||
stars: number;
|
stars: number;
|
||||||
updated_at: Date;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,13 +98,10 @@ for (const project of projects) {
|
||||||
project.stats = {
|
project.stats = {
|
||||||
forks: repository.forks,
|
forks: repository.forks,
|
||||||
stars: repository.stargazers_count,
|
stars: repository.stargazers_count,
|
||||||
updated_at: new Date(repository.updated_at),
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
projects.sort(
|
projects.sort((a, b) => a.name.localeCompare(b.name));
|
||||||
(a, b) => b.stats!.updated_at.getTime() - a.stats!.updated_at.getTime()
|
|
||||||
);
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<Layout
|
<Layout
|
||||||
|
|
Loading…
Reference in a new issue