aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-07-06 01:37:49 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:53 +0300
commit148fd4059fb3d8c8bbe8e347c2975a973b442827 (patch)
tree6d909bf791a5d793f478172195e6eada2889b8ad /vnext/src/components
parent7f25b0f261b5a5fc2696054004fb24673375b91b (diff)
Cleanup prop types warnings and debug logging
Diffstat (limited to 'vnext/src/components')
-rw-r--r--vnext/src/components/Post.js5
-rw-r--r--vnext/src/components/Types.js2
2 files changed, 2 insertions, 5 deletions
diff --git a/vnext/src/components/Post.js b/vnext/src/components/Post.js
index ff99cc27..7646d740 100644
--- a/vnext/src/components/Post.js
+++ b/vnext/src/components/Post.js
@@ -16,18 +16,15 @@ export default class Post extends React.Component {
this.state = {
attach: '',
body: params.body || ''
- }
+ };
this.fileinput = React.createRef();
- console.log(props);
}
postMessage = (template) => {
const { attach, body } = template;
post(body, attach)
.then(response => {
- console.log(response);
if (response.status === 200) {
const msg = response.data.newMessage;
- console.log(msg);
this.props.history.push(`/${this.props.visitor.uname}/${msg.mid}`);
}
}).catch(console.log);
diff --git a/vnext/src/components/Types.js b/vnext/src/components/Types.js
index 6fba9fd3..f7177f6a 100644
--- a/vnext/src/components/Types.js
+++ b/vnext/src/components/Types.js
@@ -6,7 +6,7 @@ export const UserType = PropTypes.shape({
});
export const MessageType = PropTypes.shape({
- mid: PropTypes.number.isRequired,
+ mid: PropTypes.number,
user: UserType,
timestamp: PropTypes.string.isRequired,
body: PropTypes.string