Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Closes #112
Creates a new higher order component that wraps any children given to it with the logic to handle a loading state.
I've applied this new component to both the
Favourites
and theExplore
page as they both handle similar loading of a lot of data. This component flashes the logo in assets while we load because I thought that would be a more personalised look than just adding a spinner - but that's very much under question I think.Files changed
components/WithLoading/
- new component plus stylingFavouritesPage.tsx
andExplorePage.tsx
- import the newWithLoading
component and wrap the elements displaying fetched data in itUI changes
The pages look exactly the same, but if you throttle the app you'll see the arebyte logo flashing for a few seconds before the data is loaded
Changes to Documentation
n/a
Tests
n/a - no changes to the logic in the code