diff options
author | Ashm Walia <ashmwalia@outlook.com> | 2021-02-04 00:58:35 -0800 |
---|---|---|
committer | Ashm Walia <ashmwalia@outlook.com> | 2021-02-04 00:58:35 -0800 |
commit | c1775f31b218a9c9b804de77e6ce6c1e95e968d9 (patch) | |
tree | 9f5b8519f54cbc32ba2621ca279f72e2ce213f31 /src/components/notifications/Notification.tsx | |
parent | 6335532f33fa74229881a3eb0b66c2ebcb076c76 (diff) |
Removed unnecessary code
Diffstat (limited to 'src/components/notifications/Notification.tsx')
-rw-r--r-- | src/components/notifications/Notification.tsx | 14 |
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 () => { |