import React, { useState, useEffect } from 'react';
import { Text, View, ScrollView, Button, StyleSheet } from 'react-native';
import API from './../API.js';
import UserName from './UserName.js';
import Media from './Media.js';
let Post = (props) => {
let toProfileText = props.post.toProfile && props.post.toProfile !== props.post.profileid ?
{">"} : undefined;
let cleanContent = props.post.content.replace(/@[A-z]+:.+\w/g, '');
return (
{toProfileText}
{cleanContent}
);
}
export default Post;
const styles = StyleSheet.create({
userName: {
fontSize: 14,
fontWeight: 'bold',
marginBottom: 5,
},
postView: {
margin: 8,
borderColor: 'gray',
borderWidth: 1,
padding: 10
}
});