Check for GH User Avatar before fetching it
Opened this issue · 0 comments
luketlancaster commented
The "update student prework" checkbox does a PUT, which updates the entire student object. At this point there's a student.ghAvatarUrl
on the student, so that url gets stored in the firebase DB. This is fine, but since it's there we should check if they have an avatar on their object before doing an extraneous GET for the sole purpose of loading that avatar.
Places where the GET is happening:
- SingleStudent
- GoodStudent
in GoodStudent we'll need to either set the state appropriately, or else use the ghAvatarUrl
on the student object in props