From f470636a70943a8ecad8bddc791a1c2dddd28e1e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 4 May 2019 21:13:12 +0300 Subject: Components -> UI --- vnext/src/components/Post.js | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 vnext/src/components/Post.js (limited to 'vnext/src/components/Post.js') diff --git a/vnext/src/components/Post.js b/vnext/src/components/Post.js deleted file mode 100644 index 3dc23613..00000000 --- a/vnext/src/components/Post.js +++ /dev/null @@ -1,38 +0,0 @@ -import React, { memo } from 'react'; - -import ReactRouterPropTypes from 'react-router-prop-types'; -import { UserType } from './Types'; - -import qs from 'qs'; - -import MessageInput from './MessageInput'; - -import { post } from '../api'; - -function PostComponent(props) { - let params = qs.parse(window.location.search.substring(1)); - let postMessage = (template) => { - const { attach, body } = template; - post(body, attach) - .then(response => { - if (response.status === 200) { - const msg = response.data.newMessage; - this.props.history.push(`/${this.props.visitor.uname}/${msg.mid}`); - } - }).catch(console.log); - }; - return ( -
- - *weather It is very cold today! - -
- ); -} - -export default memo(PostComponent); - -PostComponent.propTypes = { - history: ReactRouterPropTypes.history.isRequired, - visitor: UserType -}; -- cgit v1.2.3