From aaa6a3a3e3d6c73139fd44498e034c1460ecfcae Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 20 Dec 2017 14:57:52 +0300 Subject: jsx -> js --- vnext/src/components/Message.js | 52 ++++++++++++++++++++++++++++++++++++++++ vnext/src/components/message.jsx | 52 ---------------------------------------- 2 files changed, 52 insertions(+), 52 deletions(-) create mode 100644 vnext/src/components/Message.js delete mode 100644 vnext/src/components/message.jsx (limited to 'vnext/src/components') diff --git a/vnext/src/components/Message.js b/vnext/src/components/Message.js new file mode 100644 index 00000000..cf287ce9 --- /dev/null +++ b/vnext/src/components/Message.js @@ -0,0 +1,52 @@ +import React from 'react' +import PropTypes from 'prop-types' + +export default class Message extends React.Component { + render() { + const msg = this.props.data; + return ( +
+
+ +
+ {`${msg.user.uname}`} +
+
+ + + +
+
+ +
+
+

{msg.body}

+ { msg.photo && +

+ +

+ } +
+ )} +}; + +function Tags(props) { + return props.data && props.data.map(tag => { return ({ tag }) }) +} + +Message.propTypes = { + msg: PropTypes.shape({ + mid: PropTypes.number.isRequired, + user: PropTypes.shape({ + uid: PropTypes.number.isRequired, + uname: PropTypes.string.isRequired + }), + timestamp: PropTypes.string.isRequired, + body: PropTypes.string + }) +} diff --git a/vnext/src/components/message.jsx b/vnext/src/components/message.jsx deleted file mode 100644 index cf287ce9..00000000 --- a/vnext/src/components/message.jsx +++ /dev/null @@ -1,52 +0,0 @@ -import React from 'react' -import PropTypes from 'prop-types' - -export default class Message extends React.Component { - render() { - const msg = this.props.data; - return ( -
-
- -
- {`${msg.user.uname}`} -
-
- - - -
-
- -
-
-

{msg.body}

- { msg.photo && -

- -

- } -
- )} -}; - -function Tags(props) { - return props.data && props.data.map(tag => { return ({ tag }) }) -} - -Message.propTypes = { - msg: PropTypes.shape({ - mid: PropTypes.number.isRequired, - user: PropTypes.shape({ - uid: PropTypes.number.isRequired, - uname: PropTypes.string.isRequired - }), - timestamp: PropTypes.string.isRequired, - body: PropTypes.string - }) -} -- cgit v1.2.3