Last active
February 22, 2017 15:37
-
-
Save chiefGui/ef89eb40f516704b78e901e8a8e818e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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