diff options
Diffstat (limited to 'src/components/taggs')
-rw-r--r-- | src/components/taggs/Tagg.tsx | 10 | ||||
-rw-r--r-- | src/components/taggs/TaggsBar.tsx | 11 |
2 files changed, 16 insertions, 5 deletions
diff --git a/src/components/taggs/Tagg.tsx b/src/components/taggs/Tagg.tsx index 341a713a..d6cffee5 100644 --- a/src/components/taggs/Tagg.tsx +++ b/src/components/taggs/Tagg.tsx @@ -1,12 +1,15 @@ import {useNavigation} from '@react-navigation/native'; import React from 'react'; -import {StyleSheet, TouchableOpacity, View, ViewProps} from 'react-native'; +import {StyleSheet, TouchableOpacity, View} from 'react-native'; import LinearGradient from 'react-native-linear-gradient'; import {TAGGS_GRADIENT} from '../../constants'; -interface TaggProps extends ViewProps {} +interface TaggProps { + style: object; + isProfileView: boolean; +} -const Tagg: React.FC<TaggProps> = ({style}) => { +const Tagg: React.FC<TaggProps> = ({style, isProfileView}) => { const navigation = useNavigation(); return ( @@ -14,6 +17,7 @@ const Tagg: React.FC<TaggProps> = ({style}) => { onPress={() => navigation.navigate('SocialMediaTaggs', { socialMediaType: 'Instagram', + isProfileView: isProfileView, }) }> <LinearGradient diff --git a/src/components/taggs/TaggsBar.tsx b/src/components/taggs/TaggsBar.tsx index 1022c4fc..933f355d 100644 --- a/src/components/taggs/TaggsBar.tsx +++ b/src/components/taggs/TaggsBar.tsx @@ -10,11 +10,18 @@ const {View, ScrollView, interpolate, Extrapolate} = Animated; interface TaggsBarProps { y: Animated.Value<number>; profileBodyHeight: number; + isProfileView: boolean; } -const TaggsBar: React.FC<TaggsBarProps> = ({y, profileBodyHeight}) => { +const TaggsBar: React.FC<TaggsBarProps> = ({ + y, + profileBodyHeight, + isProfileView, +}) => { const taggs: Array<JSX.Element> = []; for (let i = 0; i < 10; i++) { - taggs.push(<Tagg key={i} style={styles.tagg} />); + taggs.push( + <Tagg key={i} style={styles.tagg} isProfileView={isProfileView} />, + ); } const shadowOpacity: Animated.Node<number> = interpolate(y, { inputRange: [ |