diff --git a/apps/mobile/src/components/Notification/Notifications/AnnouncementNotification.tsx b/apps/mobile/src/components/Notification/Notifications/AnnouncementNotification.tsx index e176e1a281..7e772abf1f 100644 --- a/apps/mobile/src/components/Notification/Notifications/AnnouncementNotification.tsx +++ b/apps/mobile/src/components/Notification/Notifications/AnnouncementNotification.tsx @@ -1,3 +1,4 @@ +import { useNavigation } from '@react-navigation/native'; import { ResizeMode } from 'expo-av'; import { useColorScheme } from 'nativewind'; import { useCallback, useEffect } from 'react'; @@ -12,19 +13,22 @@ import MintCampaignBottomSheet from '~/components/Mint/MintCampaign/MintCampaign import { BaseM } from '~/components/Text'; import { useBottomSheetModalActions } from '~/contexts/BottomSheetModalContext'; import { useSanityAnnouncementContext } from '~/contexts/SanityAnnouncementContext'; +import { MainTabStackNavigatorProp } from '~/navigation/types'; // Displays announcement content from Sanity export default function AnnouncementNotification() { const { announcement, markAnnouncementAsSeen, dismissAnnouncement } = useSanityAnnouncementContext(); const { showBottomSheetModal } = useBottomSheetModalActions(); + const navigation = useNavigation(); const handlePress = useCallback(() => { if (!announcement) return; showBottomSheetModal({ content: , + navigationContext: navigation, }); - }, [announcement, showBottomSheetModal]); + }, [announcement, navigation, showBottomSheetModal]); const handleDismissPress = useCallback(() => { dismissAnnouncement(); diff --git a/apps/mobile/src/hooks/useNavigateToCommunityScreen.ts b/apps/mobile/src/hooks/useNavigateToCommunityScreen.ts index 23e17529b3..100c52cbea 100644 --- a/apps/mobile/src/hooks/useNavigateToCommunityScreen.ts +++ b/apps/mobile/src/hooks/useNavigateToCommunityScreen.ts @@ -26,7 +26,7 @@ export function useNavigateToCommunityScreen() { const { chain, contractAddress, subtype, projectId } = extractRelevantMetadataFromCommunity(community); - if (navigationType === 'push') { + if (navigation.push && navigationType === 'push') { navigation.push('Community', { subtype, contractAddress,