From 40b75284328908927c31efe6bb587236eeeaabc2 Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Sat, 22 Jan 2022 13:06:05 +0000 Subject: [PATCH] Update CHANGELOG.md --- client/CHANGELOG.md | 2 ++ client/src/app/pages/dashboard/users/UserGamesPage.tsx | 1 + client/src/components/user/UGPTHeader.tsx | 7 ++++++- client/src/components/user/UGPTRankingData.tsx | 4 +++- client/src/components/user/UGPTStatShowcase.tsx | 5 ++++- 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/client/CHANGELOG.md b/client/CHANGELOG.md index b8f32e407..a3ed545ed 100644 --- a/client/CHANGELOG.md +++ b/client/CHANGELOG.md @@ -19,5 +19,7 @@ - [ENH] Added a CHANGELOG.md file. (#81) - [ENH] Rating algorithms now explain what they are in the UI. - [ENH] Massively improved the display of BPI related stuff. (#82) +- [ENH] Showcase stats on charts now link to the chart in question. +- [ENH] Ranking info is now clickable to go to the leaderboard. ***** diff --git a/client/src/app/pages/dashboard/users/UserGamesPage.tsx b/client/src/app/pages/dashboard/users/UserGamesPage.tsx index 2cff576a3..e2cd9a819 100644 --- a/client/src/app/pages/dashboard/users/UserGamesPage.tsx +++ b/client/src/app/pages/dashboard/users/UserGamesPage.tsx @@ -99,6 +99,7 @@ export function GameStatContainer({ ugs, reqUser }: { ugs: UGSWithRankingData } game={ugs.game} playtype={ugs.playtype} rankingData={ugs.__rankingData} + userID={ugs.userID} /> diff --git a/client/src/components/user/UGPTHeader.tsx b/client/src/components/user/UGPTHeader.tsx index 85ed3f6b7..e3bc16a3c 100644 --- a/client/src/components/user/UGPTHeader.tsx +++ b/client/src/components/user/UGPTHeader.tsx @@ -68,7 +68,12 @@ export function UGPTHeaderBody({
- +
); diff --git a/client/src/components/user/UGPTRankingData.tsx b/client/src/components/user/UGPTRankingData.tsx index 696e0d0f0..b13d2857d 100644 --- a/client/src/components/user/UGPTRankingData.tsx +++ b/client/src/components/user/UGPTRankingData.tsx @@ -8,9 +8,11 @@ import { UppercaseFirst } from "util/misc"; export default function RankingData({ rankingData, game, + userID, playtype, }: { rankingData: Record; + userID: integer; } & GamePT) { const alg = useProfileRatingAlg(game, playtype); @@ -37,7 +39,7 @@ export default function RankingData({
#{rankingData[alg].ranking} diff --git a/client/src/components/user/UGPTStatShowcase.tsx b/client/src/components/user/UGPTStatShowcase.tsx index beb98cd30..1697984ba 100644 --- a/client/src/components/user/UGPTStatShowcase.tsx +++ b/client/src/components/user/UGPTStatShowcase.tsx @@ -25,6 +25,7 @@ import { UGPTPreferenceStatsReturn } from "types/api-returns"; import { GamePT } from "types/react"; import { Playtype } from "types/tachi"; import { APIFetchV1 } from "util/api"; +import { CreateChartLink } from "util/data"; import { ToPercent, UppercaseFirst } from "util/misc"; import UGPTStatContainer from "./UGPTStatContainer"; import UGPTStatCreator from "./UGPTStatCreator"; @@ -390,7 +391,9 @@ export function StatDisplay({ header={
Chart
} > <> -

{FormatChart(game, song, chart)}

+ +

{FormatChart(game, song, chart)}

+

{UppercaseFirst(stat.property)}:{" "} {FormatPropertyGTE(game, playtype, stat.property, result.value)}