significant refactor
This commit is contained in:
@@ -32,7 +32,7 @@ export function transformTeam(record: any): Team {
|
||||
new Date(a.created!) < new Date(b.created!) ? -1 : 0
|
||||
)
|
||||
?.map(transformPlayer) ?? [];
|
||||
const tournaments =
|
||||
const tournaments =
|
||||
record.expand?.tournaments
|
||||
?.sort((a: Tournament, b: Tournament) =>
|
||||
new Date(a.created!) < new Date(b.created!) ? -1 : 0
|
||||
@@ -56,7 +56,7 @@ export function transformTeam(record: any): Team {
|
||||
created: record.created,
|
||||
updated: record.updated,
|
||||
players,
|
||||
tournaments
|
||||
tournaments,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user