Skip to content

Commit 1e6624a

Browse files
committed
Logos dos Novos times Bug Fix
1 parent c370b23 commit 1e6624a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/services/dataService.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Papa from 'papaparse';
22
import { Team, Round, Match } from '../types';
33

4-
const teamLogos = import.meta.glob('../assets/team-logos/*.{png,jpg,jpeg,svg}', { eager: true });
4+
const teamLogos = import.meta.glob('../assets/team-logos/*.{png,jpg,jpeg,svg,PNG,JPG,JPEG,SVG}', { eager: true });
55

66
const TEAMS_URL = 'https://docs.google.com/spreadsheets/d/e/2PACX-1vR4qBk403Kau0N0B8KlYHnHV4MSYYonQR6mwZqa7bqhU72xDOc9huu1lSYZLTq4gOu-B-08IASUXQDg/pub?gid=0&single=true&output=csv';
77
const MATCHES_URL = 'https://docs.google.com/spreadsheets/d/e/2PACX-1vR4qBk403Kau0N0B8KlYHnHV4MSYYonQR6mwZqa7bqhU72xDOc9huu1lSYZLTq4gOu-B-08IASUXQDg/pub?gid=1943059921&single=true&output=csv';
@@ -67,11 +67,12 @@ export const fetchTournamentData = async () => {
6767

6868
// 1. Try to find local logo by Sigla
6969
if (row.Sigla) {
70+
const targetSigla = row.Sigla.trim().toLowerCase();
7071
for (const path in teamLogos) {
7172
const fileName = path.split('/').pop();
7273
const nameWithoutExt = fileName?.substring(0, fileName.lastIndexOf('.'));
7374

74-
if (nameWithoutExt === row.Sigla) {
75+
if (nameWithoutExt?.toLowerCase() === targetSigla) {
7576
logoUrl = (teamLogos[path] as any).default;
7677
localLogoFound = true;
7778
break;

0 commit comments

Comments
 (0)