1
0
mirror of synced 2024-12-14 23:32:53 +01:00
bemaniutils/bemani/frontend/static/controllers/home.react.js

31 lines
790 B
JavaScript
Raw Normal View History

/*** @jsx React.DOM */
var home = React.createClass({
getInitialState: function(props) {
return {
news: window.news,
};
},
render: function() {
return (
<div>{
this.state.news.map(function(entry) {
return (
<div className="section">
<h3>{ entry.title }</h3>
<Timestamp timestamp={entry.timestamp} />
<div dangerouslySetInnerHTML={ {__html: entry.body} }></div>
</div>
);
}.bind(this))
}</div>
);
},
});
ReactDOM.render(
React.createElement(home, null),
document.getElementById('content')
);