-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathApp.js
55 lines (42 loc) · 1.29 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
'use strict';
// App specific styles
require('./app.less');
// Global libraries
var React = require('react/addons');
var { PropTypes } = React;
window.Zepto = window.$ = require('zeptojs');
require('lib/fittext?this=window');
// Components
var NavBarComponent = require('./components/NavBarComponent');
var HomePage = require('pages/HomePage');
var DocumentTitle = require('react-document-title');
var { RouteHandler } = require('react-router');
var TransitionGroup = require('react/lib/ReactCSSTransitionGroup');
var App;
module.exports = App = React.createClass({
propTypes: {
params: PropTypes.object.isRequired,
query: PropTypes.object.isRequired
},
contextTypes: {
router: React.PropTypes.func
},
render() {
var {router} = this.context;
var name = router.getCurrentPath();
let transitionName='fade';
// if(router.isActive('projectPage')){
// transitionName='moveUp';
// }
return (
<DocumentTitle title='BetaNYC Projects - Building a better tomorrow'>
<div className='App'>
<NavBarComponent/>
<TransitionGroup component="div" transitionName={transitionName} className='App'>
<RouteHandler {...this.props} key={name} />
</TransitionGroup>
</div>
</DocumentTitle>
);
}
});