diff --git a/client/src/pages/accept-privacy-terms.js b/client/src/pages/accept-privacy-terms.js index 80a2b1bd7a..5066b005e6 100644 --- a/client/src/pages/accept-privacy-terms.js +++ b/client/src/pages/accept-privacy-terms.js @@ -17,7 +17,7 @@ import Layout from '../components/Layout'; import { ButtonSpacer, Spacer } from '../components/helpers'; import { acceptTerms, userSelector } from '../redux'; import { createSelector } from 'reselect'; -import { navigateTo } from 'gatsby'; +import { navigate } from 'gatsby'; const propTypes = { acceptTerms: PropTypes.func.isRequired, @@ -66,7 +66,7 @@ class AcceptPrivacyTerms extends Component { render() { const { acceptedPrivacyTerms } = this.props; if (acceptedPrivacyTerms) { - navigateTo('/welcome'); + navigate('/welcome'); return null; } const { privacyPolicy, termsOfService, quincyEmail } = this.state; diff --git a/client/src/pages/welcome.js b/client/src/pages/welcome.js index 5e4f67346f..6f6be16216 100644 --- a/client/src/pages/welcome.js +++ b/client/src/pages/welcome.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { navigateTo } from 'gatsby'; +import { navigate } from 'gatsby'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; @@ -52,13 +52,15 @@ function Welcome({ if (pending && !complete) { return ( - +
+ +
); } if (!acceptedPrivacyTerms) { - navigateTo('/accept-privacy-terms'); + navigate('/accept-privacy-terms'); return null; } diff --git a/client/src/redux/accept-terms-saga.js b/client/src/redux/accept-terms-saga.js index 586757c901..76491fc22f 100644 --- a/client/src/redux/accept-terms-saga.js +++ b/client/src/redux/accept-terms-saga.js @@ -1,5 +1,5 @@ import { call, put, takeEvery } from 'redux-saga/effects'; -import { navigateTo } from 'gatsby'; +import { navigate } from 'gatsby'; import { acceptTermsComplete, acceptTermsError } from './'; import { createFlashMessage } from '../components/Flash/redux'; @@ -18,7 +18,7 @@ function* acceptTermsSaga({ payload: quincyEmails }) { } function* acceptCompleteSaga() { - yield call(navigateTo, '/welcome'); + yield call(navigate, '/welcome'); } export function createAcceptTermsSaga(types) { diff --git a/client/src/redux/show-cert-saga.js b/client/src/redux/show-cert-saga.js index 2918d19f3f..2512377ca1 100644 --- a/client/src/redux/show-cert-saga.js +++ b/client/src/redux/show-cert-saga.js @@ -1,5 +1,5 @@ import { put, takeEvery, call } from 'redux-saga/effects'; -import { navigateTo } from 'gatsby'; +import { navigate } from 'gatsby'; import { createFlashMessage } from '../components/Flash/redux'; import { getShowCert } from '../utils/ajax'; @@ -13,7 +13,7 @@ function* getShowCertSaga({ payload: { username, certName: cert } }) { for (let i = 0; i < messages.length; i++) { yield put(createFlashMessage(messages[i])); } - yield call(navigateTo, '/'); + yield call(navigate, '/'); return; } yield put(showCertComplete(response));