free agents
This commit is contained in:
@@ -85,6 +85,22 @@ export function transformPlayer(record: any): Player {
|
||||
};
|
||||
}
|
||||
|
||||
export function transformFreeAgent(record: any) {
|
||||
const player = record.expand?.player ? transformPlayerInfo(record.expand.player) : undefined;
|
||||
const tournaments =
|
||||
record.expand?.tournaments
|
||||
?.sort((a: any, b: any) =>
|
||||
new Date(a.created!) < new Date(b.created!) ? -1 : 0
|
||||
)
|
||||
?.map(transformTournamentInfo) ?? [];
|
||||
|
||||
return {
|
||||
id: record.id as string,
|
||||
phone: record.phone as string,
|
||||
player
|
||||
};
|
||||
}
|
||||
|
||||
export function transformTeam(record: any): Team {
|
||||
const players =
|
||||
record.expand?.players
|
||||
|
||||
Reference in New Issue
Block a user