aboutsummaryrefslogtreecommitdiff
path: root/src/components/moments/Moment.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/moments/Moment.tsx')
-rw-r--r--src/components/moments/Moment.tsx11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/components/moments/Moment.tsx b/src/components/moments/Moment.tsx
index 12c1fda4..087b343f 100644
--- a/src/components/moments/Moment.tsx
+++ b/src/components/moments/Moment.tsx
@@ -1,3 +1,4 @@
+import {useNavigation} from '@react-navigation/native';
import React from 'react';
import {StyleProp, StyleSheet, View, ViewStyle} from 'react-native';
import {Text} from 'react-native-animatable';
@@ -8,7 +9,6 @@ import DownIcon from '../../assets/icons/down_icon.svg';
import BigPlusIcon from '../../assets/icons/plus-icon-white.svg';
import UpIcon from '../../assets/icons/up_icon.svg';
import {TAGG_LIGHT_BLUE} from '../../constants';
-import * as RootNavigation from '../../RootNavigation';
import {MomentType, ScreenType} from '../../types';
import {normalize, SCREEN_WIDTH} from '../../utils';
import MomentTile from './MomentTile';
@@ -38,6 +38,7 @@ const Moment: React.FC<MomentProps> = ({
move,
externalStyles,
}) => {
+ const navigation = useNavigation();
return (
<View style={[styles.container, externalStyles?.container]}>
<View style={[styles.header, externalStyles?.header]}>
@@ -97,7 +98,13 @@ const Moment: React.FC<MomentProps> = ({
/>
))}
{(images === undefined || images.length === 0) && !userXId && (
- <TouchableOpacity onPress={() => RootNavigation.navigate('Upload')}>
+ <TouchableOpacity
+ onPress={() =>
+ navigation.navigate('CameraScreen', {
+ screenType: ScreenType.Profile,
+ selectedCategory: title,
+ })
+ }>
<LinearGradient
colors={['rgba(105, 141, 211, 1)', 'rgba(105, 141, 211, 0.3)']}>
<View style={styles.defaultImage}>