Skip to content

Commit

Permalink
Revert "Build: Async load HappyChat and network detection (#11714)" (#…
Browse files Browse the repository at this point in the history
…11840)

This reverts commit 4ed09ed.
  • Loading branch information
blowery authored Mar 7, 2017
1 parent 4ed09ed commit 1008869
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions client/boot/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,11 @@ function reduxStoreReady( reduxStore ) {
}

if ( config.isEnabled( 'network-connection' ) ) {
asyncRequire( 'lib/network-connection', netConn => netConn.init( reduxStore ) );
require( 'lib/network-connection' ).init( reduxStore );
}

if ( config.isEnabled( 'css-hot-reload' ) ) {
asyncRequire( 'lib/css-hot-reload', cssHotReload => cssHotReload() );
require( 'lib/css-hot-reload' )();
}

// Render Layout only for non-isomorphic sections.
Expand Down
8 changes: 4 additions & 4 deletions client/layout/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ var React = require( 'react' ),
/**
* Internal dependencies
*/
var AsyncLoad = require( 'components/async-load' ),
MasterbarLoggedIn = require( 'layout/masterbar/logged-in' ),
var MasterbarLoggedIn = require( 'layout/masterbar/logged-in' ),
MasterbarLoggedOut = require( 'layout/masterbar/logged-out' ),
observe = require( 'lib/mixins/data-observe' ),
GlobalNotices = require( 'components/global-notices' ),
Expand All @@ -31,7 +30,8 @@ var AsyncLoad = require( 'components/async-load' ),
QueryPreferences = require( 'components/data/query-preferences' ),
KeyboardShortcutsMenu,
Layout,
SupportUser;
SupportUser,
Happychat = require( 'components/happychat' );

import { isOffline } from 'state/application/selectors';
import { hasSidebar } from 'state/ui/selectors';
Expand Down Expand Up @@ -201,7 +201,7 @@ Layout = React.createClass( {
isEnabled={ translator.isEnabled() }
isActive={ translator.isActivated() }/>
{ this.renderPreview() }
{ config.isEnabled( 'happychat' ) && this.props.chatIsOpen && <AsyncLoad require="components/happychat" /> }
{ config.isEnabled( 'happychat' ) && this.props.chatIsOpen && <Happychat /> }
</div>
);
}
Expand Down

0 comments on commit 1008869

Please sign in to comment.