@@ -11,12 +11,10 @@ import EmailModal from '../components/modals/email'
1111import Footer from '../components/footer'
1212import Header from '../components/header'
1313import LikeModal , { didLikeFBPageStoreKey } from '../components/modals/like'
14- import SitePassword from '../components/site-password'
1514import { getFetchHeaders , getWordpressUrl } from './fetch'
1615import trackEvent from '../helpers/track-event'
1716import HeaderStore from '../stores/header'
1817import ModalStore from '../stores/modal'
19- import SitePasswordStore from '../stores/site-password'
2018import styles from '../styles/app.scss'
2119
2220@observer
@@ -38,8 +36,7 @@ export default function (Child: Object, {propPaths = () => ({}), fullWidth = fal
3836 headerStore : MobxReactPropTypes . observableObject ,
3937 likeModalStore : MobxReactPropTypes . observableObject ,
4038 pagesData : PropTypes . array ,
41- siteData : PropTypes . object ,
42- sitePasswordStore : MobxReactPropTypes . observableObject
39+ siteData : PropTypes . object
4340 }
4441
4542 static async getInitialProps ( { asPath, req, query} ) {
@@ -91,17 +88,13 @@ export default function (Child: Object, {propPaths = () => ({}), fullWidth = fal
9188 headerStore : this . headerStore ,
9289 likeModalStore : this . likeModalStore ,
9390 pagesData : this . props . pagesData ,
94- siteData : this . props . siteData ,
95- sitePasswordStore : this . sitePasswordStore
91+ siteData : this . props . siteData
9692 } )
9793
9894 componentWillMount ( ) {
9995 this . emailModalStore = new ModalStore ( )
10096 this . headerStore = new HeaderStore ( )
10197 this . likeModalStore = new ModalStore ( )
102- if ( this . props . siteData . site_password_enabled ) {
103- this . sitePasswordStore = new SitePasswordStore ( )
104- }
10598 }
10699
107100 componentDidMount ( ) {
@@ -125,10 +118,8 @@ export default function (Child: Object, {propPaths = () => ({}), fullWidth = fal
125118 props : {
126119 fetchCache : Object ,
127120 pagesData : Object ,
128- postsData : Object ,
129121 siteData : Object
130122 }
131- sitePasswordStore: Object
132123
133124 render ( ) {
134125 return (
@@ -143,17 +134,11 @@ export default function (Child: Object, {propPaths = () => ({}), fullWidth = fal
143134 </ div >
144135 </ div >
145136
146- { this . sitePasswordStore && ! this . sitePasswordStore . isAuthorized &&
147- ( ! this . props . postsData || ! this . props . postsData [ 0 ] || ! this . props . postsData [ 0 ] . _formatting ||
148- ! this . props . postsData [ 0 ] . _formatting . skip_site_password )
149- ? < SitePassword /> : (
150- < main className = { `${ maxWidthClassName ( this . props ) } mx-auto` } >
151- < div className = { fullWidthClassName ( this . props ) } >
152- < Child { ...this . props } />
153- </ div >
154- </ main >
155- )
156- }
137+ < main className = { `${ maxWidthClassName ( this . props ) } mx-auto` } >
138+ < div className = { fullWidthClassName ( this . props ) } >
139+ < Child { ...this . props } />
140+ </ div >
141+ </ main >
157142
158143 < div className = 'max-width-3 mx-auto' >
159144 < div className = 'page-x-spacing' >
0 commit comments