Tournament pool from hosting team id

This commit is contained in:
Kalle 2023-12-03 11:24:07 +02:00
parent 859e4c73cd
commit c03b4559df
2 changed files with 5 additions and 5 deletions

View File

@ -95,14 +95,14 @@ export function ScoreReporter({
{
HACKY_resolvePoolCode({
event: parentRouteData.tournament,
matchId: data.match.id,
hostingTeamId: resolveHostingTeam(teams).id,
}).prefix
}
<span className="text-theme font-bold">
{
HACKY_resolvePoolCode({
event: parentRouteData.tournament,
matchId: data.match.id,
hostingTeamId: resolveHostingTeam(teams).id,
}).lastDigit
}
</span>

View File

@ -144,17 +144,17 @@ export function checkSourceIsValid({
export function HACKY_resolvePoolCode({
event,
matchId,
hostingTeamId,
}: {
event: TournamentLoaderData["tournament"];
matchId: number;
hostingTeamId: number;
}) {
const prefix = event.name.includes("In The Zone")
? "ITZ"
: HACKY_isInviteOnlyEvent(event)
? "SQ"
: "PN";
const lastDigit = matchId % 10;
const lastDigit = hostingTeamId % 10;
return { prefix, lastDigit };
}