Closed Savvassidi closed 8 months ago
const sampleData = { rounds: [ { name: "1st round" }, { name: "2nd round" } ], matches: [ { title: "Match 1", roundIndex: 0, order: 0, sides: [ { contestantId: "163911", scores: [ { mainScore: "7", isWinner: true }, { mainScore: "6", isWinner: true }, { mainScore: "6", isWinner: true } ], isWinner: true }, { contestantId: "163806", scores: [ { mainScore: "5" }, { mainScore: "2" }, { mainScore: "2" } ] } ] }, { title: "Match 2", roundIndex: 0, order: 1, sides: [ { contestantId: "163911", scores: [ { mainScore: "7", isWinner: true }, { mainScore: "6", isWinner: true }, { mainScore: "6", isWinner: true } ], isWinner: true }, { contestantId: "163806", scores: [ { mainScore: "5" }, { mainScore: "2" }, { mainScore: "2" } ] } ] }, { title: "Match 3", roundIndex: 0, order: 2, sides: [ { contestantId: "163911", scores: [ { mainScore: "7", isWinner: true }, { mainScore: "6", isWinner: true }, { mainScore: "6", isWinner: true } ], isWinner: true }, { contestantId: "163806", scores: [ { mainScore: "5" }, { mainScore: "2" }, { mainScore: "2" } ] } ] }, { title: "Match 4",
roundIndex: 0, order: 3, sides: [ { contestantId: "163911", scores: [ { mainScore: "7", isWinner: true }, { mainScore: "6", isWinner: true }, { mainScore: "6", isWinner: true } ], isWinner: true }, { contestantId: "163806", scores: [ { mainScore: "5" }, { mainScore: "2" }, { mainScore: "2" } ] } ] }, { title: "Semi Match 1", roundIndex: 1, order: 0, sides: [ { contestantId: "163911", scores: [ { mainScore: "7", isWinner: true }, { mainScore: "6", isWinner: true }, { mainScore: "6", isWinner: true } ], isWinner: true }, { contestantId: "163806", scores: [ { mainScore: "5" }, { mainScore: "2" }, { mainScore: "2" } ] } ] }, { title: "SemiMatch 2", roundIndex: 1, order: 1, sides: [ { contestantId: "163911", scores: [ { mainScore: "7", isWinner: true }, { mainScore: "6", isWinner: true }, { mainScore: "6", isWinner: true } ], isWinner: true }, { contestantId: "163806", scores: [ { mainScore: "5" }, { mainScore: "2" }, { mainScore: "2" } ] } ] }, ], contestants: { 163806: { entryStatus: "4", players: [ { title: "D. Medvedev", nationality: "RU" } ] }, 163911: { entryStatus: "1", players: [ { title: "N. Djokovic", nationality: "RS" } ] } } }; excuse my for the copy paste but im going crazy not being able to figure whats wrong here. started experimenting with samples an hour ago and for some reason, i just cant get past order 1 and the result is looking like this, am i missing something?
closed, found out rounds should align
Ok, feel free to ask any questions, I'd be happy to help
const sampleData = { rounds: [ { name: "1st round" }, { name: "2nd round" } ], matches: [ { title: "Match 1", roundIndex: 0, order: 0, sides: [ { contestantId: "163911", scores: [ { mainScore: "7", isWinner: true }, { mainScore: "6", isWinner: true }, { mainScore: "6", isWinner: true } ], isWinner: true }, { contestantId: "163806", scores: [ { mainScore: "5" }, { mainScore: "2" }, { mainScore: "2" } ] } ] }, { title: "Match 2", roundIndex: 0, order: 1, sides: [ { contestantId: "163911", scores: [ { mainScore: "7", isWinner: true }, { mainScore: "6", isWinner: true }, { mainScore: "6", isWinner: true } ], isWinner: true }, { contestantId: "163806", scores: [ { mainScore: "5" }, { mainScore: "2" }, { mainScore: "2" } ] } ] }, { title: "Match 3", roundIndex: 0, order: 2, sides: [ { contestantId: "163911", scores: [ { mainScore: "7", isWinner: true }, { mainScore: "6", isWinner: true }, { mainScore: "6", isWinner: true } ], isWinner: true }, { contestantId: "163806", scores: [ { mainScore: "5" }, { mainScore: "2" }, { mainScore: "2" } ] } ] }, { title: "Match 4",