diff --git a/app/components/MessageInfoModal.js b/app/components/MessageInfoModal.js index f8ab74b..50f3a9e 100644 --- a/app/components/MessageInfoModal.js +++ b/app/components/MessageInfoModal.js @@ -1,67 +1,67 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import autoBind from 'auto-bind'; import { View } from 'react-native'; import { Chip, Dialog, Portal, Text, Button, Surface, TextInput, Paragraph, DataTable } from 'react-native-paper'; import KeyboardAwareDialog from './KeyBoardAwareDialog'; const DialogType = Platform.OS === 'ios' ? KeyboardAwareDialog : Dialog; import styles from '../assets/styles/blink/_MessageInfoModal.scss'; class MessageInfoModal extends Component { constructor(props) { super(props); autoBind(this); this.state = { show: this.props.show, message: this.props.message } } UNSAFE_componentWillReceiveProps(nextProps) { this.setState({message: nextProps.message, show: nextProps.show}); } render() { if (!this.state.message) { return (null); } return ( - Message {this.props.message._id} + Message info - {this.props.message.createdAt} + {this.state.message.createdAt} - {this.props.message.sent ? 'Delivered' : 'Not yet delivered'} + {this.state.message.sent ? 'Delivered' : 'Not yet delivered'} - {this.props.message.received ? 'Read' : 'Not yet delivered'} + {this.state.message.received ? 'Read' : 'Not yet read'} ); } } MessageInfoModal.propTypes = { show : PropTypes.bool, close : PropTypes.func.isRequired, message : PropTypes.object }; export default MessageInfoModal;