-
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
feat(Bonus Pagamenti Digitali): [#177306957] Add ko service error screen #2904
Conversation
Affected stories
|
Codecov Report
@@ Coverage Diff @@
## master #2904 +/- ##
==========================================
+ Coverage 57.99% 58.37% +0.38%
==========================================
Files 882 883 +1
Lines 24221 24245 +24
Branches 4466 4467 +1
==========================================
+ Hits 14047 14154 +107
+ Misses 10084 9999 -85
- Partials 90 92 +2
Continue to review full report at Codecov.
|
…e-error-screen' into 177306957-ko-service-error-screen
@@ -36,9 +34,6 @@ const LoadPrivativeSearch = (props: Props): React.ReactElement | null => { | |||
const { privativeSelected } = props; | |||
|
|||
if (privativeSelected === undefined) { | |||
showToast(I18n.t("global.genericError"), "danger"); |
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.
Is it ok to give no UI feedback if privativeSelected
is undefined?
(I could have a low context on this story)
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.
This screen is managed by SearchPrivativeCardScreen
.
The case in which you arrive in this screen with privativeSelected === undefined
is not expected, so this is an extra layer of safety.
I removed this functions in the component because they're already called by SearchPrivativeCardScreen
with the same condition and the SearchPrivativeCardScreen
is the only screen that use LoadPrivativeSearch
.
io-app/ts/features/wallet/onboarding/privative/screens/search/SearchPrivativeCardScreen.tsx
Lines 74 to 78 in 326c075
if (privativeSelected === undefined) { | |
showToast(I18n.t("global.genericError"), "danger"); | |
void mixpanelTrack("PRIVATIVE_NO_QUERY_PARAMS_ERROR"); | |
props.cancel(); | |
} else { |
Do you think there is a better way to manage it?
ts/features/wallet/onboarding/privative/screens/search/ko/PrivativeKoServiceError.tsx
Outdated
Show resolved
Hide resolved
…ativeKoServiceError.tsx Co-authored-by: Matteo Boschi <[email protected]>
Short description
This PR show the ko service error screen if there is at least one KO in the
searchRequestMetadata
field of the privative card research response.List of changes proposed in this pull request
PrivativeKoServiceError
screenSearchPrivativeCardScreen
tests