Showing
1 changed file
with
1 additions
and
19 deletions
1 | import React from "react"; | 1 | import React from "react"; |
2 | import styled from "styled-components"; | 2 | import styled from "styled-components"; |
3 | import ProfileIcon from "./ProfileIcon"; | 3 | import ProfileIcon from "./ProfileIcon"; |
4 | -import moment from "moment"; | ||
5 | 4 | ||
6 | const MessageWrapper = styled.div` | 5 | const MessageWrapper = styled.div` |
7 | display: flex; | 6 | display: flex; |
... | @@ -35,21 +34,7 @@ const Msg = styled.span` | ... | @@ -35,21 +34,7 @@ const Msg = styled.span` |
35 | padding: 20px 10px; | 34 | padding: 20px 10px; |
36 | `; | 35 | `; |
37 | 36 | ||
38 | -const TimeBox = styled.div` | 37 | +export default ({ text, avatar }) => { |
39 | - display: flex; | ||
40 | - justify-content: flex-end; | ||
41 | - align-items: center; | ||
42 | - opacity: 0.8; | ||
43 | -`; | ||
44 | - | ||
45 | -const Time = styled.span` | ||
46 | - font-size: 15px; | ||
47 | -`; | ||
48 | - | ||
49 | -export default ({ text, avatar, time }) => { | ||
50 | - const test = moment.utc().valueOf(); | ||
51 | - console.log(typeof test); | ||
52 | - console.log(typeof time); | ||
53 | return ( | 38 | return ( |
54 | <MessageWrapper className="MessageWrapper"> | 39 | <MessageWrapper className="MessageWrapper"> |
55 | <MsgContainer> | 40 | <MsgContainer> |
... | @@ -58,9 +43,6 @@ export default ({ text, avatar, time }) => { | ... | @@ -58,9 +43,6 @@ export default ({ text, avatar, time }) => { |
58 | <MsgBox> | 43 | <MsgBox> |
59 | <Msg> {text} </Msg> | 44 | <Msg> {text} </Msg> |
60 | </MsgBox> | 45 | </MsgBox> |
61 | - <TimeBox> | ||
62 | - <Time>{time}</Time> | ||
63 | - </TimeBox> | ||
64 | </ColumnBox> | 46 | </ColumnBox> |
65 | </MsgContainer> | 47 | </MsgContainer> |
66 | </MessageWrapper> | 48 | </MessageWrapper> | ... | ... |
-
Please register or login to post a comment