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/app.js | 2 +-
vnext/src/components/Message.js | 52 ++++++++++++++++++++++++++++++++++++++++
vnext/src/components/message.jsx | 52 ----------------------------------------
vnext/webpack.config.js | 2 +-
4 files changed, 54 insertions(+), 54 deletions(-)
create mode 100644 vnext/src/components/Message.js
delete mode 100644 vnext/src/components/message.jsx
(limited to 'vnext')
diff --git a/vnext/src/app.js b/vnext/src/app.js
index bfaf8912..ba5ce816 100644
--- a/vnext/src/app.js
+++ b/vnext/src/app.js
@@ -3,7 +3,7 @@ import React from "react"
import PropTypes from "prop-types"
import ReactDOM from "react-dom"
-import Message from "./components/Message.jsx"
+import Message from "./components/Message"
class Page extends React.Component {
constructor(props) {
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.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.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/webpack.config.js b/vnext/webpack.config.js
index 3935cc01..d86fa182 100644
--- a/vnext/webpack.config.js
+++ b/vnext/webpack.config.js
@@ -18,7 +18,7 @@ module.exports = {
module: {
loaders: [
{ test: /\.css$/, loader: "style-loader!css-loader" },
- { test: /\.js(x?)$/, exclude: /node_modules/, loader: "babel-loader" },
+ { test: /\.js$/, exclude: /node_modules/, loader: "babel-loader" },
{ test: /\.(jpe?g|png|gif|svg)$/i, loaders: [
'file-loader?hash=sha512&digest=hex&name=[hash].[ext]',
'image-webpack-loader'
--
cgit v1.2.3