File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import { ContributorRow } from "@/app/components/ContributorRow";
77import leaderboardData from "@/generated/site-leaderboard.json" ;
88
99// We use the generated JSON
10- const mockRanks = leaderboardData as {
10+ const rawRanks = leaderboardData as {
1111 id : string ;
1212 name : string ;
1313 points : number ;
@@ -16,8 +16,13 @@ const mockRanks = leaderboardData as {
1616 contributedDocs ?: { id : string ; title : string ; url : string } [ ] ;
1717} [ ] ;
1818
19+ // 维护一个容器(数组),填写需要从排行榜中屏蔽的维护者或用户的名称
20+ const MAINTAINERS = [ "longsizhuo" , "Mira190" ] ;
21+
22+ const mockRanks = rawRanks . filter ( ( user ) => ! MAINTAINERS . includes ( user . name ) ) ;
23+
1924export default function RankPage ( ) {
20- const maxPoints = mockRanks [ 0 ] . points ;
25+ const maxPoints = mockRanks . length > 0 ? mockRanks [ 0 ] . points : 100 ;
2126
2227 return (
2328 < >
You can’t perform that action at this time.
0 commit comments