Open vmaineng opened 3 months ago
In WeekTeams, logos come from the schedule data (competition.team.logo). In LeagueEntries, the logo comes from a prop (teamLogo), likely set based on the user's pick
Essentially, the 'Entry' and 'WeekTeams' components are grabbing data from different information hence why the teamLogos do not match up.
Here is what I'm thinking of doing to correct this:
1) Store the schedule data in the Zustand store
const useScheduleStore = create((set) => ({ schedule: [], loading: true, fetchSchedule: async () => { set({ loading: true }); try { const schedule = await getSchedule(); set({ schedule, loading: false }); } catch (error) { console.error('Error fetching schedule:', error); set({ loading: false }); } }, }));
2) then call the functions in 'Entry' and 'WeekTeams' components Am I on the right track with this?
Please see the research conducted to ensure teamLogo
is correctly pulled from Appwrite's collection: https://docs.google.com/document/d/1GCK2R5l4sO2ILc7edXSHUJY5uGmZBUiHpUyFYKd_4ho/edit?usp=sharing
Currently showing old teamLogos:
This is what the teamLogos should look like: