Last active
October 20, 2016 12:20
-
-
Save tomitrescak/35b43b6e7e78e84d99606ab4e4917c93 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 from 'react'; | |
import Helmet from 'react-helmet'; | |
import { style } from 'typestyle'; | |
import { i18n } from 'es2015-i18n-tag'; | |
const content = style({ margin: '30px' }); | |
export class Layout extends React.Component { | |
static contextTypes = { | |
Ui: React.PropTypes.object | |
}; | |
render() { | |
return ( | |
<main> | |
<div id="content" className={content}> | |
<Helmet titleTemplate={i18n`My Site / %s`} /> | |
<div id="main"> | |
{ this.props.children } | |
</div> | |
</div> | |
<div id="footer" className={footer}> | |
{ this.props.footer } | |
</div> | |
</main > | |
); | |
} | |
componentDidMount() { | |
this.context.Ui.pageTransition(); | |
} | |
}; | |
export default Layout; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment