Skip to content

Commit

Permalink
releasef fixing the resp for empty thingy
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammers21 committed Jan 6, 2024
1 parent 72b4f3b commit fa8e965
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions frontend/src/containers/MClassLeaderboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,11 @@ function MClassLeaderboard(dota) {
setLoading(true);
const dt = await getMulticlasserLeaderboard(region, role, page);
const res = dt.multiclassers;
setRowsToShow(res);
setTotalPages(dt.total_pages);
setLoading(false);
if (res !== undefined) {
setRowsToShow(res);
setTotalPages(dt.total_pages);
setLoading(false);
}
};
React.useEffect(() => {
getLeaderboard(region as REGION, role, page);
Expand All @@ -128,13 +130,25 @@ function MClassLeaderboard(dota) {
<div className="mx-2 my-2 mb-10 px-4 py-4 rounded-2xl bg-[#2f384d4d]">
<Typography variant="h4">Multiclassers</Typography>
<Typography variant="body1">
Top { role === "all" ? "" : role + " "} multiclassers in {region.toUpperCase()} based on their highest ladder spots on every unique spec.
Each spec is counted only once, and maximum score per each spec is 1000 for rank #1.
More information on the exact formula can be found on the
<a href="https://twitter.com/sammers_wow/status/1740958624380506258" target="_blank" rel="noopener noreferrer" className="text-blue-500"> original tweet</a>.
Top {role === "all" ? "" : role + " "} multiclassers in{" "}
{region.toUpperCase()} based on their highest ladder spots on every
unique spec. Each spec is counted only once, and maximum score per
each spec is 1000 for rank #1. More information on the exact formula
can be found on the
<a
href="https://twitter.com/sammers_wow/status/1740958624380506258"
target="_blank"
rel="noopener noreferrer"
className="text-blue-500"
>
{" "}
original tweet
</a>
.
</Typography>
<Typography variant="body1">
<b>Example:</b> If player has #1 on 3 different specs in solo shuffle, his score will be 3000.
<b>Example:</b> If player has #1 on 3 different specs in solo
shuffle, his score will be 3000.
</Typography>
</div>
<div className="mx-2 my-2 px-4 py-4 rounded-2xl bg-[#2f384d4d]">
Expand Down

0 comments on commit fa8e965

Please sign in to comment.