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

#112/loading favourites #126

Merged
merged 4 commits into from
Nov 12, 2024
Merged

#112/loading favourites #126

merged 4 commits into from
Nov 12, 2024

Conversation

camelPhonso
Copy link
Contributor

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 the Explore 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 styling
  • FavouritesPage.tsx and ExplorePage.tsx - import the new WithLoading component and wrap the elements displaying fetched data in it

UI 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

Copy link
Contributor

@nichgalzin nichgalzin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff

@camelPhonso camelPhonso merged commit 8192db2 into dev Nov 12, 2024
1 check passed
@camelPhonso camelPhonso deleted the #112/loading-favourites branch November 12, 2024 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle loading for FavouritesPage.tsx 🛄
2 participants