diff --git a/public/css/custom.css b/public/css/custom.css
new file mode 100644
index 0000000..713a6f6
--- /dev/null
+++ b/public/css/custom.css
@@ -0,0 +1,9 @@
+.avatar .username {
+ display: none;
+}
+.avatar:hover .username {
+ display: block;
+ position: absolute;
+ z-index: 1;
+ float: left;
+}
diff --git a/public/index.html b/public/index.html
index 29939c5..0d5c4d5 100644
--- a/public/index.html
+++ b/public/index.html
@@ -7,6 +7,7 @@
+
app
diff --git a/src/components/Chat.js b/src/components/Chat.js
index cd0add3..aefee80 100644
--- a/src/components/Chat.js
+++ b/src/components/Chat.js
@@ -52,6 +52,9 @@ class Chat extends React.Component {
handleSubmit(e) {
e.preventDefault()
+ if (this.state.text === '') {
+ return
+ }
const message = { socketId: socket.id, id: uuid(), text: this.state.text }
const messages = this.state.messages.concat(message)
this.setState({ messages, text: '' })
diff --git a/src/components/SingleMessage.js b/src/components/SingleMessage.js
index 4585cec..eef2304 100644
--- a/src/components/SingleMessage.js
+++ b/src/components/SingleMessage.js
@@ -5,18 +5,29 @@ const SingleMessage = props => {
if (user.socketId === socketId)
return (
-
- {text}
+
+
+ {text}
+
00:00 AM | July 14
+
)
return (
-
- {user.socketId}: {text}
+
+
+
+ {user.socketId}
+
+
+
+ {text}
+
00:00 AM | July 14
+
)
}