mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-07-19 17:12:58 -05:00
Tournament pool from hosting team id
This commit is contained in:
parent
859e4c73cd
commit
c03b4559df
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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 };
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user