Clicklable links added to top scorers table

This commit is contained in:
Lucas Patenaude
2024-04-14 22:11:53 -06:00
parent 17704288c7
commit 74fc302530
3 changed files with 4 additions and 4 deletions

View File

@@ -24,7 +24,7 @@ const fetchLeagueScorerData = async (req, res, next) => {
player_name: player.player.name,
},
team: {
team_id: player.player.id,
team_id: player.team.id,
team_name: player.team.name,
team_crest: player.team.crest,
},

View File

@@ -1,5 +1,5 @@
// Add click event listener to club logos
document.querySelectorAll('#table-club-logo, #club-name').forEach(element => {
document.querySelectorAll('#table-club-logo, #club-name, #top-scorers-logo').forEach(element => {
element.addEventListener('click', (event) => {
// Get the club ID from the clicked club logo's clubID attribute
const clubId = element.getAttribute('clubID');