chore(navigate): gatsby depricated navigateTo -> navigate

This commit is contained in:
Bouncey
2018-09-07 13:33:32 +01:00
committed by Stuart Taylor
parent c5c4f3aa41
commit 56494ffc32
4 changed files with 11 additions and 9 deletions

View File

@@ -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 (
<Layout>
<Loader />
<div className='loader-wrapper'>
<Loader />
</div>
</Layout>
);
}
if (!acceptedPrivacyTerms) {
navigateTo('/accept-privacy-terms');
navigate('/accept-privacy-terms');
return null;
}