import React from 'react'; import {Image, StyleSheet, Text, View} from 'react-native'; import {SimplePostType} from '../../types'; import {SCREEN_WIDTH} from '../../utils'; import {DateLabel, PostCarousel} from '../common'; import TaggPostFooter from './TaggPostFooter'; import Hyperlink from 'react-native-hyperlink'; interface TaggPostProps { post: SimplePostType; social: string; } const TaggPost: React.FC = ({post, social}) => { if (post.media_type === 'photo') { // Post with image and footer that shows caption return ( {post.media_url?.length === 1 && post.media_url[0] !== null ? ( ) : ( )} ); } else { // Post with large text return ( {post.caption} ); } }; const styles = StyleSheet.create({ photoContainer: { marginBottom: 50, }, image: { width: SCREEN_WIDTH, height: SCREEN_WIDTH, backgroundColor: '#eee', }, imageWithMargin: { width: SCREEN_WIDTH, height: SCREEN_WIDTH, backgroundColor: '#1d0034', marginBottom: 30, resizeMode: 'contain', }, textContianer: {marginBottom: 50, paddingHorizontal: 10}, text: { marginBottom: 30, fontSize: 18, color: 'white', flexWrap: 'wrap', }, linkColor: {color: '#2980b9'}, }); export default TaggPost;