1
0
mirror of synced 2024-12-29 22:03:04 +01:00
bemaniutils/bemani/frontend/static/controllers/home.react.js

31 lines
789 B
JavaScript
Raw Normal View History

/*** @jsx React.DOM */
var home = createReactClass({
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')
);