diff --git a/src/js/features/license/reducer.js b/src/js/features/license/reducer.js index fd50d2f1..8ae0792c 100644 --- a/src/js/features/license/reducer.js +++ b/src/js/features/license/reducer.js @@ -47,7 +47,7 @@ function reducer(state = DEFAULT_STATE, action) { }; case CHECK_LICENSE_OWNER: return { - ...state, licenseOwner: false + ...state }; case CHECK_LICENSE_OWNER_SUCCEEDED: return { diff --git a/src/js/wizards/Sell/0_Location/index.jsx b/src/js/wizards/Sell/0_Location/index.jsx index 8d9fd24b..f4318d27 100644 --- a/src/js/wizards/Sell/0_Location/index.jsx +++ b/src/js/wizards/Sell/0_Location/index.jsx @@ -5,7 +5,6 @@ import {connect} from "react-redux"; import DOMPurify from 'dompurify'; import SellerPosition from './components/SellerPosition'; -import Loading from '../../../components/Loading'; import newSeller from "../../../features/newSeller"; import metadata from "../../../features/metadata"; @@ -13,8 +12,7 @@ class Location extends Component { constructor(props) { super(props); this.state = { - location: props.seller.location, - ready: false + location: props.seller.location }; this.validate(props.seller.location); this.props.footer.onPageChange(() => { @@ -22,15 +20,6 @@ class Location extends Component { }); } - componentDidMount() { - if (this.props.profile && this.props.profile.location) { - this.props.setLocation(DOMPurify.sanitize(this.props.profile.location)); - this.props.wizard.next(); - } else { - this.setState({ready: true}); - } - } - validate(location) { if (location) { this.props.footer.enableNext(); @@ -45,10 +34,6 @@ class Location extends Component { }; render() { - if (!this.state.ready) { - return ; - } - return ; } } diff --git a/src/js/wizards/Wizard.jsx b/src/js/wizards/Wizard.jsx index f3988238..a2226de7 100644 --- a/src/js/wizards/Wizard.jsx +++ b/src/js/wizards/Wizard.jsx @@ -7,7 +7,8 @@ import withFooterHoC from './hoc/withFooter'; class Wizard extends Component { constructor(props) { super(props); - let currentStep = props.steps.findIndex((step) => props.location.hash.endsWith(step.path)); + const locationHash = props.location.hash || props.location.pathname; + let currentStep = props.steps.findIndex((step) => locationHash.endsWith(step.path)); if (currentStep === -1) { currentStep = 0;