Some style fixes
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user