Skip to content

Commit 15feba2

Browse files
committed
fix: HACK去除Maintainer
1 parent 6ac69a2 commit 15feba2

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

app/rank/page.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { ContributorRow } from "@/app/components/ContributorRow";
77
import 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+
1924
export default function RankPage() {
20-
const maxPoints = mockRanks[0].points;
25+
const maxPoints = mockRanks.length > 0 ? mockRanks[0].points : 100;
2126

2227
return (
2328
<>

0 commit comments

Comments
 (0)