glitch effect avatar
This commit is contained in:
@@ -59,9 +59,7 @@ export const transformMatch = (record: any, isAdmin: boolean = false): Match =>
|
||||
}
|
||||
|
||||
export const transformTournamentInfo = (record: any): TournamentInfo => {
|
||||
// Check if tournament is complete by looking at matches
|
||||
const matches = record.expand?.matches || [];
|
||||
// Filter out bye matches (tbd status with bye=true) when checking completion
|
||||
const nonByeMatches = matches.filter((match: any) => !(match.status === 'tbd' && match.bye === true));
|
||||
const isComplete = nonByeMatches.length > 0 && nonByeMatches.every((match: any) => match.status === 'ended');
|
||||
|
||||
@@ -108,6 +106,7 @@ export const transformTournamentInfo = (record: any): TournamentInfo => {
|
||||
start_time: record.start_time,
|
||||
end_time: record.end_time,
|
||||
logo: record.logo,
|
||||
glitch_logo: record.glitch_logo,
|
||||
first_place,
|
||||
second_place,
|
||||
third_place,
|
||||
@@ -258,6 +257,7 @@ export function transformTournament(record: any, isAdmin: boolean = false): Tour
|
||||
desc: record.desc,
|
||||
rules: record.rules,
|
||||
logo: record.logo,
|
||||
glitch_logo: record.glitch_logo,
|
||||
enroll_time: record.enroll_time,
|
||||
start_time: record.start_time,
|
||||
end_time: record.end_time,
|
||||
|
||||
Reference in New Issue
Block a user