Skip to content

Use useLoadingState hook in route files#918

Open
Valkyriezz wants to merge 1 commit intofedora-infra:swatantryafrom
Valkyriezz:useloadinghook
Open

Use useLoadingState hook in route files#918
Valkyriezz wants to merge 1 commit intofedora-infra:swatantryafrom
Valkyriezz:useloadinghook

Conversation

@Valkyriezz
Copy link
Copy Markdown

Description

The useLoadingState hook in features/hooks.js handles showing and hiding the loading indicator. It's already used across the CRUD files, but none of the route files were using it. Instead, each route manually repeated the same useEffect with dispatch(showLoad()) / dispatch(hideLoad()).

This change replaces that duplicated pattern with the existing hook in 10 route files: homepage, accolade, accolist, identity, userpast, findpage, rankings, rarities, recently, and category.

Four routes — callback, campaign, addendum, and governor were left unchanged because their loading logic is more complex and doesn't fit the hook's pattern.

Closes #917

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.

1 participant