-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix the problem with instant redirect #390
Conversation
GneyHabub
commented
Apr 24, 2021
- Fixed the problem with redirecting after an error
- Fixed the problem with the height of JSONEditor
- Slightly improved the schema edition form
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 think we should call each api request in updateSchema
thunk instead of dispatching other thunks, since update is a separate user action, which should have its own request/success/failure action callers. In that case we can use try/catch inside updateSchema
, throw an error in the end of catch block, and catch this error in the component to determine if we should redirect or not. That will allow us avoid using all those statuses updates and get rid of confusing useEffect
s.
kafka-ui-react-app/src/components/common/JSONEditor/JSONEditor.tsx
Outdated
Show resolved
Hide resolved
SonarCloud Quality Gate failed. |
* Fix the problem with instant redirect * Rewrite updateSchema thunk