Show current user rank in leaderboard (#1263)

close #1000 maybe #1178 too

*  Show current user rank in the leaderboard with +-1 user (only on leaderboard 
*  Extend auto_main script to use random user.
*  Support colSpan in the DataTable component (I haven't verified colSpan in header yet, leave that until we need it)
*  Refactor OasstError to include the path and request method.
This commit is contained in:
notmd
2023-02-07 14:49:50 +09:00
committed by GitHub
parent 931e12f31e
commit 952e021c88
8 changed files with 396 additions and 254 deletions
@@ -1,6 +1,6 @@
import { Card, CardBody, Link, Text } from "@chakra-ui/react";
import { useTranslation } from "next-i18next";
import NextLink from "next/link";
import { useTranslation } from "next-i18next";
import { LeaderboardTable } from "src/components/LeaderboardTable";
import { LeaderboardTimeFrame } from "src/types/Leaderboard";
@@ -19,7 +19,7 @@ export function LeaderboardWidget() {
</div>
<Card>
<CardBody>
<LeaderboardTable timeFrame={LeaderboardTimeFrame.day} limit={5} rowPerPage={5} />
<LeaderboardTable timeFrame={LeaderboardTimeFrame.day} limit={5} rowPerPage={5} hideCurrentUserRanking />
</CardBody>
</Card>
</div>