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

GH-2269, GIS-904: Allow account to trigger dawn hub #673

Merged
merged 9 commits into from Feb 5, 2021

add dontReroute param

  • Loading branch information
fcjr committed Feb 4, 2021
commit ff3d70c85340109d2601c6d17c1cf46d378a3a21
@@ -36,6 +36,7 @@ import {
} from './OnboardingConstants';

const justInstalled = (QueryString.parse(window.location.search).justInstalled === 'true') || false;
const dontReroute = (QueryString.parse(window.location.search).dontReroute === 'true') || false;

/**
* @class Wrap the root onboarding flow view of the Dawn Hub
@@ -49,6 +50,11 @@ class OnboardingViewContainer extends Component {
sendMountActions: false,
};

if (!dontReroute) {
const { history } = this.props;
history.push(`/${ONBOARDING}/${WELCOME}`);
}

// TODO verify what document title we should use
const title = t('ghostery_dawn_onboarding_page_title');
window.document.title = title;
@@ -318,7 +318,7 @@ function handleAccountPages(name, callback) {
await globals.BROWSER_INFO_READY;
if (BROWSER_INFO.name === 'ghostery_desktop') {
utils.openNewTab({
url: chrome.runtime.getURL(`./app/templates/dawn_hub.html#${ONBOARDING}/${CHOOSE_DEFAULT_SEARCH}`),
url: chrome.runtime.getURL(`./app/templates/dawn_hub.html?dontReroute=true#${ONBOARDING}/${CHOOSE_DEFAULT_SEARCH}`),
become_active: true
});
}
ProTip! Use n and p to navigate between commits in a pull request.