From c1775f31b218a9c9b804de77e6ce6c1e95e968d9 Mon Sep 17 00:00:00 2001 From: Ashm Walia Date: Thu, 4 Feb 2021 00:58:35 -0800 Subject: Removed unnecessary code --- src/components/notifications/Notification.tsx | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'src') 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 = (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 = (props) => { url = obj.notification_data.thumbnail_url; } if (url) { - setMomentThumbnailUrl(url); + setMomentURI(url); } } - return () => { - mounted = false; - }; }, [id, notification_object, notification_type]); const onNotificationTap = async () => { -- cgit v1.2.3-70-g09d2