-
Notifications
You must be signed in to change notification settings - Fork 106
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
[#172992641] Check bonus eligibility #1841
Conversation
…eck-bonus-eligibility
Affected stories
Generated by 🚫 dangerJS |
// TODO: link with the right reducer | ||
isLoading: true, | ||
// TODO: link with the right reducer | ||
errorText: "A text that explains why the operation failed" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the error could be a network error, otherwise we should receive a response from our backend.
Could it be a solution to show an error toast informing the user that something went wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to have a generic error, I can remove the errorText
and use the default message used within the GenericErrorComponent
("Ooops, qualcosa è andato storto! Probabilmente è un errore momentaneo, riprova per piacere!"). In this case we can also avoid a toast that which would repeat the error information. What you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good!
Co-authored-by: Matteo Boschi <[email protected]>
Short description:
This pr adds the screen for the "check bonus eligibility" phase.
This screen have a loading state, displaying the
loading
view in table below, and an error view, displaying a message explaining the reasons of the error and two button to cancel o retry.List of changes proposed in this pull request:
ts/features/bonusVacanze/components/GenericLoadingErrorScreen.tsx
a generic screen that implements the logic required by this screen, without being tied to the application flow of redux.ts/features/bonusVacanze/screens/CheckBonusEligibilityScreen.tsx
a specific screen that tie the generic component with the business logic of the application. At the moment, placeholders are provided instead of concrete actions and reducers.How to test:
In order to test this dummy component, I've just replaced one existing with this one (for example in
MessagesNavigator.ts
replacescreen: MessageHomeScreen
withscreen: CheckBonusEligibilityScreen
).