aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components/message.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/components/message.jsx')
-rw-r--r--vnext/src/components/message.jsx26
1 files changed, 13 insertions, 13 deletions
diff --git a/vnext/src/components/message.jsx b/vnext/src/components/message.jsx
index faeb4b4e..78ebdd38 100644
--- a/vnext/src/components/message.jsx
+++ b/vnext/src/components/message.jsx
@@ -1,15 +1,7 @@
-import React, {PropTypes} from "react"
+import React from 'react'
+import PropTypes from 'prop-types'
-const Message = React.createClass({
- propTypes: {
- mid: PropTypes.number.isRequired,
- user: PropTypes.shape({
- uid: PropTypes.number.isRequired,
- uname: PropTypes.string.isRequired
- }),
- timestamp: PropTypes.string.isRequired,
- body: PropTypes.string.isRequired
- },
+export default class Message extends React.Component {
render() { return (
<article>
<aside>
@@ -21,6 +13,14 @@ const Message = React.createClass({
<time dateTime={this.props.timestamp} title={this.props.timestamp}>{this.props.timestamp}</time></a></header>
<p>{this.props.body}</p>
</article>) }
-});
+};
-export default Message \ No newline at end of file
+Message.propTypes = {
+ mid: PropTypes.number.isRequired,
+ user: PropTypes.shape({
+ uid: PropTypes.number.isRequired,
+ uname: PropTypes.string.isRequired
+ }),
+ timestamp: PropTypes.string.isRequired,
+ body: PropTypes.string.isRequired
+}