blob: 0736ceff4750eaddc8922e9296ae386c56ed5bcc (
plain) (
tree)
|
|
import React from 'react'
import PropTypes from 'prop-types'
import { Redirect, Route } from 'react-router-dom'
import { INITIALIZE_ROUTE } from '../../routes'
export default function Initialized (props) {
return props.completedOnboarding
? <Route { ...props } />
: <Redirect to={{ pathname: INITIALIZE_ROUTE }} />
}
Initialized.propTypes = {
completedOnboarding: PropTypes.bool,
}
|