From e9bc02e3984d5a4c65c669c1abfa234e5b2187ed Mon Sep 17 00:00:00 2001 From: sk337 Date: Wed, 24 Jan 2024 11:05:49 -0800 Subject: [PATCH] update leaderboard --- src/Leaderboard.jsx | 21 +++++++++++++++++---- src/utils/leaderboard.js | 3 +++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/Leaderboard.jsx b/src/Leaderboard.jsx index 6f692b8..4e76b38 100644 --- a/src/Leaderboard.jsx +++ b/src/Leaderboard.jsx @@ -4,10 +4,12 @@ import { Select, SelectContent, SelectItem, + SelectGroup, + SelectLabel, SelectTrigger, SelectValue, } from "@/components/ui/select"; -import { ranges, types, getLeaderboard } from "@/utils/leaderboard"; +import { ranges, types, rangeLst, typeLst, getLeaderboard } from "@/utils/leaderboard"; import { id2skin, prettyNum, playtimeParse } from "@/utils/jsutils"; import { getPubInfo } from "@/utils/login"; @@ -15,10 +17,8 @@ import { getPubInfo } from "@/utils/login"; import UserCard from "@/components/usercard"; export default function Leaderboard() { - const [ignored, forceUpdate] = useReducer(x => x + 1, 0); const [leaderboard, setLeaderboard] = useState([]); const [profiles, setProfiles] = useState([]); - const [upd, setUpd] = useState(0); const [range, setRange] = useState("all"); const [type, setType] = useState("xp"); @@ -52,10 +52,23 @@ export default function Leaderboard() {