aboutsummaryrefslogtreecommitdiff
path: root/src/components/taggs/TaggPostFooter.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/taggs/TaggPostFooter.tsx')
-rw-r--r--src/components/taggs/TaggPostFooter.tsx29
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;