Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for GH User Avatar before fetching it #27

Open
luketlancaster opened this issue Apr 19, 2020 · 0 comments
Open

Check for GH User Avatar before fetching it #27

luketlancaster opened this issue Apr 19, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@luketlancaster
Copy link
Owner

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

@luketlancaster luketlancaster added enhancement New feature or request good first issue Good for newcomers labels Apr 19, 2020
@luketlancaster luketlancaster self-assigned this Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant