{each_msg}
+ return( + + +diff --git a/v-tech-app/src/containers/chats/chat_area/index.css b/v-tech-app/src/containers/chats/chat_area/index.css index e215a3f..5d4f164 100644 --- a/v-tech-app/src/containers/chats/chat_area/index.css +++ b/v-tech-app/src/containers/chats/chat_area/index.css @@ -4,8 +4,6 @@ background:whitesmoke; } - - .text > p:first-of-type{ width:100%; margin-top:0; @@ -42,6 +40,10 @@ background:whitesmoke; bottom: 10px; + width: 735px; + margin-top: 15px; + height: 50px; + border-radius: 40px; } .msj{ float:left; @@ -50,9 +52,10 @@ } .frame{ background:rgb(243, 243, 243); - height:480px; + height:500px; padding:0px; width: 735px; + margin-bottom: 38px; } .frame > div:last-of-type{ @@ -92,7 +95,24 @@ input:focus{ .li_msg{ - display: inline-block; + display: inline; padding: 10px; - -} \ No newline at end of file + padding-left: 15px; + border-radius: 20px; + min-width: 200px; + max-width: 450px; +} + +.time{ + clear: left; + font-size: 9pt; + color: rgb(1, 185, 189); + margin-bottom: 10px; + padding-top: 5px; +} + +.msg_text{ + font-size: 11pt; + display: inline; + min-width: 200px; +} diff --git a/v-tech-app/src/containers/chats/chat_area/index.js b/v-tech-app/src/containers/chats/chat_area/index.js index ca30501..c5be7db 100644 --- a/v-tech-app/src/containers/chats/chat_area/index.js +++ b/v-tech-app/src/containers/chats/chat_area/index.js @@ -11,6 +11,7 @@ import { connect } from 'react-redux'; //import { msg_successful } from '../../../modules/messages_reducer' import { append_chat } from '../../../modules/chats_reducer' import { get_all_msgs } from '../../../modules/messages_reducer' +import { chats_on_load } from '../../../modules/chats_reducer' //-- No use time. It is a javaScript effect. @@ -49,6 +50,16 @@ import { get_all_msgs } from '../../../modules/messages_reducer' // eslint-disable-next-line +/*window.onload = function () { + if (! localStorage.justOnce) { + localStorage.setItem("justOnce", "true"); + alert("This works") + window.location.reload(); + this.forceUpdate() + } +}*/ + + class AppChatArea extends React.Component { handleKeyPress = (event) => { @@ -61,32 +72,39 @@ class AppChatArea extends React.Component { //var array = this.props.get_all_msgs() this.props.append_chat(text2) + //this.props.messages.map(all_msgs) } this.forceUpdate(); + } + + addMessage() { //return this.props.friends.map((friend) => { - return this.props.open_chat.map((each_msg) => { + return this.props.chat_set.current_convo.map((each_msg, index) => { - return( - - -
{each_msg}
+ return( + + +