Add photo to comments

This commit is contained in:
Adolfo Reyna
2025-02-22 00:07:35 -05:00
parent a1b2143337
commit 91e9740159

View File

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