fix: sign-in/sign-up form shows success even if API was not sent successfully [SPMVP-6214] #187
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.
Jira
https://storipress-media.atlassian.net/browse/SPMVP-6214
Root cause
subscribe 的 submit button 按下後會呼叫 paywall 的 handleSignup,handleSignup 這邊只有判斷如果是已經註冊過的使用者在呼叫 login 後就直接顯示 dialog,並沒有判斷是否有呼叫成功
Purpose
修正即使未登入成功仍會顯示成功訊息
For who
How did you fix it?
如果呼叫 sign-in/sign-up api 未成功,顯示錯誤提示視窗
Production deployment notes
🎩 Tophat
Do a thorough 🎩. What is tophatting?
Consider testing:
🎩 Instructions
2023-11-01.12.26.24.mov
Related PRs
Checklist before requesting review
// eslint-ignore-next-line <rule name>
on it)skipcq
comment)Emoji Guide
For reviewers: Emojis can be added to comments to call out blocking versus non-blocking feedback.
E.g: Praise, minor suggestions, or clarifying questions that don’t block merging the PR.
E.g: Blocking feedback must be addressed before merging.
Gif (optional)