var React = require( 'react' ), SkipButton = require( '../skip-button' ), SiteStore = require( 'stores/site-store' ), WelcomeSection = require( '../page/container' ), SetupProgressActions = require( 'actions/setup-progress-actions' ), Button = require( '@automattic/dops-components/client/components/button' ); function getJetpackState() { return { site_title: SiteStore.getTitle(), jetpackConfigured: SiteStore.getJetpackConfigured(), jumpstartEnabled: SiteStore.getJetpackJumpstartEnabled(), modulesEnabled: SiteStore.getActiveModuleSlugs(), settingsUrl: SiteStore.getJetpackSettingsUrl() }; } module.exports = React.createClass( { componentDidMount: function() { SiteStore.addChangeListener( this._onChange ); JPS.shownBusinessAddressStep = true; }, componentWillUnmount: function() { SiteStore.removeChangeListener( this._onChange ); }, _onChange: function() { this.setState( getJetpackState() ); }, getInitialState: function() { var state = getJetpackState(); state.showMoreModules = false; state.jetpackConnecting = false; const { business_address_1, business_address_2, business_city, business_state, business_zip } = JPS.bloginfo; let business_name = JPS.bloginfo.business_name; if ( 'undefined' === typeof business_name ) { business_name = state.site_title; } state = Object.assign( {}, state, { business_address_1, business_address_2, business_city, business_name, business_state, business_zip } ); return state; }, handleChange: function( e ) { var newValue = {}; newValue[ e.currentTarget.name ] = e.currentTarget.value; this.setState( newValue ); }, handleSubmit: function( e ) { e.preventDefault(); SetupProgressActions.submitBusinessAddress( this.state ); }, render: function() { return (

Let's launch {this.state.site_title}

Add your business address (if you have one)

); } } );