diff options
author | Ivan Chen <ivan@thetaggid.com> | 2020-10-22 17:42:29 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-22 17:42:29 -0400 |
commit | 52a3fe743e6122d157eaab3ad7bab0c70a96676b (patch) | |
tree | 564c5df3864a0d0fe09f7c18613d4cf5a1093170 /src/components/taggs/TaggPostFooter.tsx | |
parent | 08f9aebbaef871629323767c93c9e54cea527bed (diff) |
[TMA-242] Twitter and Facebook Tagg View (#63)
* modified the way we store social media data, initial skeleton
* MVP? Twitter done?
* cleaned up some things
* forgot to lint and cleaned up some more code
* minor change to text display
* fixed some UI bug, linting, and minor adjustment to posts UI
* fixed a couple of things
* added DateLabel, Facebook taggs view, fixed minor stuff
* Some small changes for the PR
* removed unused Feed
Co-authored-by: Ashm Walia <ashmwalia@outlook.com>
Diffstat (limited to 'src/components/taggs/TaggPostFooter.tsx')
-rw-r--r-- | src/components/taggs/TaggPostFooter.tsx | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/components/taggs/TaggPostFooter.tsx b/src/components/taggs/TaggPostFooter.tsx index 024670a8..8371a847 100644 --- a/src/components/taggs/TaggPostFooter.tsx +++ b/src/components/taggs/TaggPostFooter.tsx @@ -1,30 +1,32 @@ import React from 'react'; import {StyleSheet, View} from 'react-native'; import {Text} from 'react-native-animatable'; +import {DateLabel} from '../common'; interface TaggPostFooterProps { - likes: number; - handle: string; + likes?: number; + handle?: string; caption: string; - date: string; + timestamp: string; } const TaggPostFooter: React.FC<TaggPostFooterProps> = ({ likes, handle, caption, - date, + timestamp, }) => { + const handleText = handle ? handle : ''; return ( <View> <View style={styles.container}> - <Text style={styles.likeText}>{likes} likes</Text> + {likes ? <Text style={styles.likeText}>{likes} likes</Text> : <></>} <View style={styles.captionContainer}> <Text style={styles.handleText}> - {handle} + {handleText} <Text style={styles.captionText}> {caption}</Text> </Text> </View> - <Text style={styles.dateText}>{date}</Text> + <DateLabel timestamp={timestamp} type={'small'} /> </View> </View> ); @@ -33,11 +35,11 @@ const TaggPostFooter: React.FC<TaggPostFooterProps> = ({ const styles = StyleSheet.create({ container: { flexDirection: 'column', - padding: 10, - paddingBottom: '10%', + paddingHorizontal: 10, + marginBottom: 50, }, captionContainer: { - paddingVertical: 10, + paddingBottom: 30, }, likeText: { fontSize: 14, @@ -51,15 +53,10 @@ const styles = StyleSheet.create({ }, captionText: { fontSize: 14, - fontWeight: 'bold', + fontWeight: 'normal', color: 'white', flexWrap: 'wrap', }, - dateText: { - fontSize: 14, - fontWeight: 'bold', - color: '#8FA9C2', - }, }); export default TaggPostFooter; |