Skip to content
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

Fixes for Dawn Onboarding toast messages #660

Merged
merged 12 commits into from Jan 21, 2021

Move setToast code up in if block

  • Loading branch information
leuryr committed Jan 15, 2021
commit a0ed7d8e12ebce2e5b5fa03c88ff2be49570e629
@@ -70,6 +70,11 @@ class BlockSettingsView extends Component {

// Will only change user settings if all questions are answered
if (blockAds !== null && kindsOfTrackers !== null && antiTracking !== null && smartBrowsing !== null) {
setToast({
toastMessage: '',
toastClass: ''
});

const {
setAdBlock, setAntiTracking, setSmartBlocking, setBlockingPolicy, setSetupStep
} = actions;
@@ -94,10 +99,7 @@ class BlockSettingsView extends Component {
break;
}
setBlockingPolicy({ blockingPolicy });
setToast({
toastMessage: '',
toastClass: ''
});

setSetupStep({ setup_step: CHOOSE_DEFAULT_SEARCH, origin: ONBOARDING });
history.push('/onboarding/3');
} else {
ProTip! Use n and p to navigate between commits in a pull request.