bruin-tennis-consulting / match-manager

A web app for custom tennis match playback, allowing coaches to easily filter and search points by attributes for film review.
https://match-viewing-dashboard.web.app
8 stars 8 forks source link

Optimize logo fetching #178

Closed awest25 closed 2 weeks ago

awest25 commented 2 months ago

Currently, logos are being fetched from the server every time they are rendered. Go through and impliment caching to make a standard way of storing logos locally. For example, when switching between the points and PDF when viewing a match, the logos should not be fetched every time.

Note that while you're doing this, you should look for other instances of this with, for example, the match data itself or the PDF. Logos are the most visible but we want to eventually optimize all of these as well.

Tips

I did a refactor for keeping track of match state and using the context api with a custom hook useMatchData. You could follow a similar pattern, and either couple the logos to this state or do a new state or osmethign different altogether.

Fredenck commented 2 weeks ago

closed #184