Skip to content

Instantly share code, notes, and snippets.

@chiefGui
Last active February 22, 2017 15:37
Show Gist options
  • Save chiefGui/ef89eb40f516704b78e901e8a8e818e4 to your computer and use it in GitHub Desktop.
Save chiefGui/ef89eb40f516704b78e901e8a8e818e4 to your computer and use it in GitHub Desktop.
import React, {Component} from 'react'
import {Header, Sidebar, Body, Content, Footer} from './containers'
import Modal from '../components/Modal'
class Home extends Component {
constructor () {
super()
this.openModal = this.openModal.bind(this)
this.closeModal = this.closeModal.bind(this)
}
state = {isContactModalOpen: false}
openModal() {
this.setState({isContactModalOpen: true})
}
closeModal () {
this.setState({isContactModalOpen: false})
}
render () {
const {isContactModalOpen} = this.state
return (
<div>
{isContactModalOpen && <Modal onClose={this.closeModal} />)
<Header />
<Body>
<Sidebar onClickRegisterButton={this.openModal} />
<Content />
</Body>
<Footer />
</div>
)
}
}
export default Home
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment