sdy

add moment.js

import React from "react";
import styled from "styled-components";
import ProfileIcon from "./ProfileIcon";
import moment from "moment";
const MessageWrapper = styled.div`
display: flex;
......@@ -45,7 +46,8 @@ const Time = styled.span`
font-size: 15px;
`;
export default ({ text, avatar }) => {
export default ({ text, avatar, time }) => {
let UTCTime = moment.utc(time).format("HH:mm");
return (
<MessageWrapper className="MessageWrapper">
<MsgContainer>
......@@ -55,7 +57,7 @@ export default ({ text, avatar }) => {
<Msg> {text} </Msg>
</MsgBox>
<TimeBox>
<Time>1</Time>
<Time>{UTCTime}</Time>
</TimeBox>
</ColumnBox>
</MsgContainer>
......