rrcampbell-exe / real-fake-birds

A guessing game featuring real fake birds.
https://www.realfakebirds.app
1 stars 0 forks source link

Add timeout to birdCall #55

Closed rrcampbell-exe closed 11 months ago

rrcampbell-exe commented 11 months ago

Add a timeout to birdCall so that if it takes more than 5 seconds to return a bird, players see a screen that says "No birds found." And then give them an option to "look harder" or try again later.

rrcampbell-exe commented 11 months ago

This is been implemented on a feature branch, but the birdCall function should be commented for clarity and a refactor of the BirdName component should accompany these changes before they are deployed to prod.

rrcampbell-exe commented 11 months ago

The birdCall function has now been commented for clarity. BirdName needs to be refactored to have three states: isLoading, isError, and a state for if data is returned.

rrcampbell-exe commented 11 months ago

BirdName has now been refactored for maintainability. This issue can be closed with the merge of PR #56