From e04229d8a42a034c66cd0b20776726d130d84c9d Mon Sep 17 00:00:00 2001 From: Jeremy Scheff Date: Fri, 7 Feb 2025 19:33:54 -0500 Subject: [PATCH] Bring back "Compare top 5 prospects" links for Draft and Draft Scouting pages --- TODO | 4 ---- src/ui/views/Draft.tsx | 17 +++++++++++++++++ src/ui/views/DraftScouting/DraftClass.tsx | 17 ++++++++++++++++- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/TODO b/TODO index 06c884055..af3f73c48 100644 --- a/TODO +++ b/TODO @@ -1,11 +1,7 @@ -export bug https://discord.com/channels/290013534023057409/290015591216054273/1335186753593802763 - show # of teams in each division when making expansion draft https://old.reddit.com/r/BasketballGM/comments/1iingd3/i_added_a_bunch_of_expansion_teams_but_added_too/ https://www.compart.com/en/unicode/U+1F3C6 rather than ring -bring back compre top 5 draft links - apply checkbox td hack to buttons too - should correctly handle hover state - bootstrap utility? diff --git a/src/ui/views/Draft.tsx b/src/ui/views/Draft.tsx index 35255a258..9dd85130e 100644 --- a/src/ui/views/Draft.tsx +++ b/src/ui/views/Draft.tsx @@ -447,6 +447,23 @@ const Draft = ({ + {undrafted.length > 1 ? ( +
+ `${p.pid}-${season}-r`) + .join(","), + ])} + > + Compare top {Math.min(5, undrafted.length)} remaining{" "} + {helpers.plural("prospect", undrafted.length)} + +
+ ) : null} +

diff --git a/src/ui/views/DraftScouting/DraftClass.tsx b/src/ui/views/DraftScouting/DraftClass.tsx index dbf2db0aa..f5d0bc382 100644 --- a/src/ui/views/DraftScouting/DraftClass.tsx +++ b/src/ui/views/DraftScouting/DraftClass.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; import { DataTable, LeagueFileUpload } from "../../components"; -import { downloadFile, getCols, toWorker } from "../../util"; +import { downloadFile, getCols, helpers, toWorker } from "../../util"; import type { View } from "../../../common/types"; import { WEBSITE_ROOT } from "../../../common"; import { wrappedPlayerNameLabels } from "../../components/PlayerNameLabels"; @@ -105,6 +105,21 @@ const DraftClass = ({ ) : null}

+ {players.length > 1 ? ( + `${p.pid}-${season}-r`) + .join(","), + ])} + > + Compare top {Math.min(5, players.length)}{" "} + {helpers.plural("prospect", players.length)} + + ) : null}
)}