Add Customizable Error Page Component #93
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
This pull request introduces the following features:
Customizable Error Page Component:
A reusable error page that displays dynamic error codes, messages, and provides options for retrying or redirecting to another page. This component enhances error handling and user experience by providing clear feedback for different error scenarios.
Election Data Fetching:
On the homepage, election data is fetched asynchronously with enhanced error handling. If the data takes longer than expected, a timeout is triggered, and an error message is displayed. This improves the reliability of the data-fetching process and ensures the user is notified if the data cannot be loaded.
Key Features:
Error Page Component:
404
if not provided).Reload
), which is shown only when a retry handler function is provided./
).Election Data Fetching:
Motivation and Context
This pull request aims to improve both the error-handling experience on the site and the reliability of loading election data.
Changes Made:
Election Component Update:
Final Result:
error-component.-.Made.with.Clipchamp.mp4