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

Ghostery Dawn Miscellaneous Bug fixes #664

Merged
merged 7 commits into from Jan 22, 2021
Prev

Clear toasts when clicking skip button

  • Loading branch information
benstrumeyer committed Jan 22, 2021
commit 0ae3d86f1424c3f31e71af4d86ed9346195e230e
@@ -54,16 +54,24 @@ const renderFAQListItem = (icon, label, description) => (
*/
const Step1_CreateAccountView = (props) => {
const { user, actions } = props;
const { setSetupStep } = actions;
const { setSetupStep, setToast } = actions;
const email = user && user.email;

const [view, setView] = useState(CREATE_ACCOUNT);

const handleSkipButton = () => {
setSetupStep({ setup_step: LOGIN, origin: ONBOARDING });
setToast({
toastMessage: '',
toastClass: ''
});
};

const renderSkipLink = () => (
<div className="row align-center-middle">
<div className="columns small-10 medium-6" />
<div className="columns small-10 medium-6">
<NavLink className="Step1_CreateAccountView__skip" to="/onboarding/2" onClick={() => setSetupStep({ setup_step: LOGIN, origin: ONBOARDING })}>
<NavLink className="Step1_CreateAccountView__skip" to="/onboarding/2" onClick={() => handleSkipButton()}>
<span>{t('ghostery_dawn_onboarding_skip')}</span>
</NavLink>
</div>
@@ -75,7 +83,7 @@ const Step1_CreateAccountView = (props) => {
<div className="Step1_CreateAccountView__title">{t('ghostery_dawn_onboarding_you_are_signed_in_as')}</div>
<div className="Step1_CreateAccountView__email">{email}</div>
<div className="Step1_CreateAccountView__ctaButtonContainer">
<NavLink className="Step1_CreateAccountView__ctaButton" to="/onboarding/2" onClick={() => setSetupStep({ setup_step: LOGIN, origin: ONBOARDING })}>
<NavLink className="Step1_CreateAccountView__ctaButton" to="/onboarding/2" onClick={() => handleSkipButton()}>
<span>{t('next')}</span>
</NavLink>
</div>
@@ -14,9 +14,11 @@
import { buildReduxHOC } from '../../../../shared-hub/utils';
import Step1_CreateAccountView from './Step1_CreateAccountView';
import { setSetupStep } from '../../../../shared-hub/actions/SetupLifecycleActions';
import setToast from '../../../../shared-hub/actions/ToastActions';

const actionCreators = {
setSetupStep,
setToast
};

export default buildReduxHOC(['account'], actionCreators, Step1_CreateAccountView);
ProTip! Use n and p to navigate between commits in a pull request.