aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/notifications/Notification.tsx14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/components/notifications/Notification.tsx b/src/components/notifications/Notification.tsx
index 93853198..64454bfc 100644
--- a/src/components/notifications/Notification.tsx
+++ b/src/components/notifications/Notification.tsx
@@ -65,15 +65,6 @@ const Notification: React.FC<NotificationProps> = (props) => {
}, []);
useEffect(() => {
- let mounted = true;
- const setMomentThumbnailUrl = async (url: string) => {
- if (mounted && url) {
- setMomentURI(url);
- } else {
- // if not set to empty, it will re-use the previous notification's state
- setMomentURI(undefined);
- }
- };
if (notification_object) {
let url: string | undefined;
let obj;
@@ -88,12 +79,9 @@ const Notification: React.FC<NotificationProps> = (props) => {
url = obj.notification_data.thumbnail_url;
}
if (url) {
- setMomentThumbnailUrl(url);
+ setMomentURI(url);
}
}
- return () => {
- mounted = false;
- };
}, [id, notification_object, notification_type]);
const onNotificationTap = async () => {