aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/screens/profile/MomentCommentsScreen.tsx21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/screens/profile/MomentCommentsScreen.tsx b/src/screens/profile/MomentCommentsScreen.tsx
index 7dfe8ae9..490edd53 100644
--- a/src/screens/profile/MomentCommentsScreen.tsx
+++ b/src/screens/profile/MomentCommentsScreen.tsx
@@ -1,5 +1,9 @@
-import {RouteProp, useNavigation} from '@react-navigation/native';
-import React, {useEffect, useState} from 'react';
+import {
+ RouteProp,
+ useFocusEffect,
+ useNavigation,
+} from '@react-navigation/native';
+import React, {useCallback, useEffect, useState} from 'react';
import {StyleSheet, View} from 'react-native';
import {SafeAreaView} from 'react-native-safe-area-context';
import {TabsGradient} from '../../components';
@@ -52,6 +56,19 @@ const MomentCommentsScreen: React.FC<MomentCommentsScreenProps> = ({route}) => {
CommentType | CommentThreadType | undefined
>();
+ useFocusEffect(
+ useCallback(() => {
+ navigation.dangerouslyGetParent()?.setOptions({
+ tabBarVisible: false,
+ });
+ return () => {
+ navigation.dangerouslyGetParent()?.setOptions({
+ tabBarVisible: true,
+ });
+ };
+ }, [navigation]),
+ );
+
useEffect(() => {
navigation.setOptions({
...headerBarOptions('black', `${commentsLength} Comments`),