-
Notifications
You must be signed in to change notification settings - Fork 18
/
app.js
54 lines (45 loc) · 1.07 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import Navigation from '../components/navigation'
import {
createCallout
} from '../actions'
import '../styles/index.css'
import '../styles/foundation.scss'
// load jquery and foundation in the window scope
import 'script!jquery'
import 'script!what-input'
import 'script!foundation-sites'
class App extends Component {
constructor(props) {
super(props)
}
render() {
// children are components which defined in the routes as children of App
const { children } = this.props
return (
<div>
<Navigation createCallout={this.props.createCallout} />
<div className='row'>
<div className='large-12 columns'>
{this.props.children}
</div>
</div>
</div>
)
}
componentDidMount() {
$(document).foundation()
}
}
App.propTypes = {
// Injected by React Router
children: PropTypes.node
}
function mapStateToProps(state) {
return {
}
}
export default connect(mapStateToProps, {
createCallout
})(App)