Add moment

This commit is contained in:
aeroreyna
2022-03-12 21:52:08 -08:00
parent 0e8c0a17d0
commit 1abf26ce60
4 changed files with 34 additions and 29 deletions

View File

@@ -6,6 +6,7 @@ import UserName from './UserName.js';
import Media from './Media.js';
import Comment from "./Comment";
import NewComment from './NewComment.js';
import Moment from 'moment';
let Post = (props) => {
@@ -58,12 +59,15 @@ let Post = (props) => {
<Text style={styles.userName}>
<UserName profileid={post.profileid} />
{toProfileText}
<Text style={{ fontWeight: 'normal', fontSize: 12 }}>
{" " + Moment(post.createdAt).fromNow()}
</Text>
</Text>
<Text style={{ fontSize: 18 }}>{cleanContent}</Text>
<Media content={post.content} />
</View> :
<View>
<Chip icon="new-releases" style={{width:100}} >News</Chip>
<Chip icon="new-releases" style={{ width: 100 }} >News</Chip>
<Text style={{ fontSize: 18 }}>{cleanContent}</Text>
</View>
}