From b138c10822e399c84e54c35e2775e4eb53da1567 Mon Sep 17 00:00:00 2001
From: Ivan Chen <ivan@tagg.id>
Date: Fri, 15 Jan 2021 17:53:05 -0500
Subject: fixed some bugs

---
 src/components/notifications/Notification.tsx | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

(limited to 'src/components/notifications/Notification.tsx')

diff --git a/src/components/notifications/Notification.tsx b/src/components/notifications/Notification.tsx
index 62aa0a0b..5efa8b98 100644
--- a/src/components/notifications/Notification.tsx
+++ b/src/components/notifications/Notification.tsx
@@ -15,7 +15,6 @@ import {
 
 interface NotificationProps {
   item: NotificationType;
-  userXId: string | undefined;
   screenType: ScreenType;
 }
 
@@ -28,7 +27,6 @@ const Notification: React.FC<NotificationProps> = (props) => {
       notification_object,
       unread,
     },
-    userXId,
     screenType,
   } = props;
   const navigation = useNavigation();
@@ -62,7 +60,7 @@ const Notification: React.FC<NotificationProps> = (props) => {
     let mounted = true;
     const loadMomentImage = async (moment_id: string) => {
       const response = await loadMomentThumbnail(moment_id);
-      if (mounted) {
+      if (mounted && response) {
         setMomentURI(response);
       }
     };
@@ -97,7 +95,7 @@ const Notification: React.FC<NotificationProps> = (props) => {
         if (moment) {
           navigation.push('IndividualMoment', {
             moment,
-            userXId,
+            userXId: undefined, // we're only viewing our own moment here
             screenType,
           });
           setTimeout(() => {
-- 
cgit v1.2.3-70-g09d2

