Add photo to comments
This commit is contained in:
@@ -10,6 +10,7 @@ import Moment from 'moment';
|
|||||||
import i18n from "../i18nMessages.js";
|
import i18n from "../i18nMessages.js";
|
||||||
import 'moment/min/locales';
|
import 'moment/min/locales';
|
||||||
Moment.locale(i18n.locale);
|
Moment.locale(i18n.locale);
|
||||||
|
import ProfilePhotoCircle from './ProfilePhotoCircle.js';
|
||||||
|
|
||||||
let Comment = ({ comment, postid }) => {
|
let Comment = ({ comment, postid }) => {
|
||||||
const gState = useSnapshot(GlobalState);
|
const gState = useSnapshot(GlobalState);
|
||||||
@@ -32,11 +33,17 @@ let Comment = ({ comment, postid }) => {
|
|||||||
<Card style={styles.comment}>
|
<Card style={styles.comment}>
|
||||||
<Card.Content>
|
<Card.Content>
|
||||||
<View style={{ flexDirection: "row", alignItems: "center", justifyContent: "center" }}>
|
<View style={{ flexDirection: "row", alignItems: "center", justifyContent: "center" }}>
|
||||||
<View style={{flex:8}}>
|
<View style={{ flex: 8, marginBottom: 8 }}>
|
||||||
<Text style={styles.userName}>
|
<ProfilePhotoCircle profileid={comment.profileid} />
|
||||||
<UserName profileid={comment.profileid} key={comment.profileid} />
|
<Text style={
|
||||||
<Text style={{fontSize: 12, fontWeight: "normal"}}> {Moment(comment.createdAt).fromNow()}</Text>
|
{
|
||||||
</Text>
|
fontSize: 12,
|
||||||
|
fontWeight: "normal",
|
||||||
|
position: "absolute",
|
||||||
|
top: 20,
|
||||||
|
left: 37,
|
||||||
|
}
|
||||||
|
}> {Moment(comment.createdAt).fromNow()}</Text>
|
||||||
</View>
|
</View>
|
||||||
<View style={{ flex: 2 }}>
|
<View style={{ flex: 2 }}>
|
||||||
<Button
|
<Button
|
||||||
@@ -60,12 +67,6 @@ const styles = StyleSheet.create({
|
|||||||
margin: 8,
|
margin: 8,
|
||||||
marginTop: 0,
|
marginTop: 0,
|
||||||
},
|
},
|
||||||
userName: {
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: 'bold',
|
|
||||||
marginBottom: 5,
|
|
||||||
fontSize: 16
|
|
||||||
},
|
|
||||||
likeComment: {
|
likeComment: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
margin: 16,
|
margin: 16,
|
||||||
|
|||||||
Reference in New Issue
Block a user