Skip to content

Commit

Permalink
Move numAllStar to count
Browse files Browse the repository at this point in the history
  • Loading branch information
dumbmatter committed Sep 4, 2024
1 parent 21d1f5d commit 62beb24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
5 changes: 0 additions & 5 deletions src/common/getCols.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2728,11 +2728,6 @@ const cols: {
"@": {
desc: "Home or Away",
},
"#AS": {
desc: "Number of All-Star Selections",
sortSequence: ["desc", "asc"],
sortType: "number",
},
"%": {
desc: "Percentage",
sortSequence: ["desc", "asc"],
Expand Down
9 changes: 4 additions & 5 deletions src/ui/views/AllStarTeams/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ const PlayersTable = ({
"Age",
"Ovr",
...stats.map(stat => `stat:${stat}`),
"#AS",
];
if (name !== "Remaining") {
colNames.unshift("#");
Expand All @@ -61,7 +60,7 @@ const PlayersTable = ({
const p = remaining.find(p2 => p2.pid === pid);
return p;
}),
]
]
)
// Filter everything, because `players` might have empty slots too due to deleted players
.filter(p => p !== undefined);
Expand All @@ -83,14 +82,14 @@ const PlayersTable = ({
skills: p.skills,
watch: p.watch,
legacyName: p.name,
count: p.numAllStar,
}),
<a href={helpers.leagueUrl(["roster", `${p.abbrev}_${p.tid}`, season])}>
{p.abbrev}
</a>,
p.age,
!challengeNoRatings ? p.ratings.ovr : null,
...stats.map(stat => helpers.roundStat(p.stats[stat], stat)),
p.numAllStar,
];
if (name !== "Remaining") {
data.unshift(i + 1);
Expand Down Expand Up @@ -274,7 +273,7 @@ const AllStars = ({
allowHealthy: true,
allowInjured: true,
},
]
]
: [
{
name: teamNames[0],
Expand All @@ -294,7 +293,7 @@ const AllStars = ({
allowHealthy: false,
allowInjured: true,
},
]
]
}
type={type}
onDone={() => {
Expand Down

0 comments on commit 62beb24

Please sign in to comment.