Skip to content

Moiz- BOT-2689 - Popup and Welcome to Deriv Bot Popup overlaping each other #348

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

moiz-deriv
Copy link
Contributor

fix: removed modal overlap caused due to rendering of both tnc and welcome tour modal simultaneously.
Condition check added if welcome popup is open then the TNC popup will not render in

Copy link

Preview Link: https://Moiz-BOT-2689.bot-65f.pages.dev

Name Result
Build status Completed ✅
Preview URL Visit Preview
Action URL Visit Action

Comment on lines +38 to +48
React.useEffect(() => {
if (is_tnc_needed) {
setIsTourOpen(false);
} else {
if (is_tour_dialog_visible) {
setIsTourOpen(true);
} else {
setIsTourOpen(false);
}
}
}, [is_tnc_needed, is_tour_dialog_visible]);
Copy link
Contributor

@mayuran-deriv mayuran-deriv Apr 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
React.useEffect(() => {
if (is_tnc_needed) {
setIsTourOpen(false);
} else {
if (is_tour_dialog_visible) {
setIsTourOpen(true);
} else {
setIsTourOpen(false);
}
}
}, [is_tnc_needed, is_tour_dialog_visible]);
React.useEffect(() => {
setIsTourOpen(!is_tnc_needed && is_tour_dialog_visible);
}, [is_tnc_needed, is_tour_dialog_visible]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants