Some style fixes

This commit is contained in:
Adolfo Reyna
2023-01-25 14:34:23 -05:00
parent 93b84ada33
commit 03e20edbcc
7 changed files with 17 additions and 14 deletions

View File

@@ -3,6 +3,7 @@ import { Text, View, ScrollView, StyleSheet } from 'react-native';
import { FAB, Button, Card, Title, IconButton } from 'react-native-paper';
import API from './../API.js';
import UserName from './UserName.js';
import Media from './Media.js';
import { useSnapshot } from 'valtio';
import GlobalState from '../contexts/GlobalState.js';
import Moment from 'moment';
@@ -14,6 +15,7 @@ let Comment = ({ comment, postid }) => {
const gState = useSnapshot(GlobalState);
const viewer = gState.me;
let [likes, changeLikes] = useState(Object.keys(comment.reactions).length);
let cleanContent = comment.content.replace(/@[A-z]+:.+\w/g, '');
const newCommentReaction = () => {
if (!comment.reactions[viewer._id]) {
comment.reactions[viewer._id] = { type: "like" };
@@ -44,8 +46,8 @@ let Comment = ({ comment, postid }) => {
>{likes ? likes : ''}</Button>
</View>
</View>
<Text style={{fontSize: 16}}>{comment.content}</Text>
<Text style={{fontSize: 14}}>{cleanContent}</Text>
<Media content={comment.content} postId={postid} skiptVideo={true}/>
</Card.Content>
</Card>
);