-
Notifications
You must be signed in to change notification settings - Fork 303
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
Mahdiyeh/ Fix: rerendering the TradingPasswordModal component #5286
Mahdiyeh/ Fix: rerendering the TradingPasswordModal component #5286
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -206,7 +206,7 @@ const ResetTradingPasswordModal = ({ | |||
const [dialog_title, setDialogTitle] = React.useState(''); | |||
const history = useHistory(); | |||
React.useEffect(() => { | |||
if (is_visible) { | |||
if (is_visible && history.location.search !== '') { |
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.
replacing the history resulted in rerendering the component , adding the condition prevent the unnecessary re-rendering
b6f419e
to
e603d04
Compare
Codecov Report
@@ Coverage Diff @@
## master #5286 +/- ##
==========================================
- Coverage 13.33% 13.33% -0.01%
==========================================
Files 1282 1282
Lines 29019 29020 +1
Branches 4894 4895 +1
==========================================
Hits 3870 3870
- Misses 24911 24912 +1
Partials 238 238
Continue to review full report at Codecov.
|
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
A production App ID was automatically generated for this PR. (log)
Click here to copy & paste above information.
|
…com#5286) * fix rerendering the TradingPasswordModal component * fix reopening the invester password Co-authored-by: Matin shafiei <matin@deriv.com>
Changes:
Please include a summary of the change and which issue is fixed below:
When you need to add unit test
When you need to add integration test
Test coverage checklist (for reviewer)
Type of change