-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathapp.js
More file actions
40 lines (34 loc) · 1.02 KB
/
app.js
File metadata and controls
40 lines (34 loc) · 1.02 KB
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
const React = require('react');
const ImmutablePropTypes = require('react-immutable-proptypes');
const Component = require('react-pure-render/component');
const Sidebar = require('./sidebar');
const Schema = require('./schema');
class App extends Component {
static propTypes = {
schemas: ImmutablePropTypes.list.isRequired,
config: React.PropTypes.object,
};
render() {
const { schemas, config } = this.props;
return (
<div id="wrapper">
<Sidebar schemas={schemas} />
<div id="page-content-wrapper">
<div className="container-fluid">
<div className="row">
<div className="col-lg-12">
<h1>{config.title}</h1>
{schemas
.filter(schema => !schema.get('cfHidden'))
.valueSeq()
.map(schema => <Schema key={schema.get('id')} schema={schema} />)
}
</div>
</div>
</div>
</div>
</div>
);
}
}
module.exports = App;