diff options
| author | Ivan Chen <ivan@tagg.id> | 2021-06-09 17:37:40 -0400 |
|---|---|---|
| committer | Ivan Chen <ivan@tagg.id> | 2021-06-09 17:37:40 -0400 |
| commit | 93796732be3f5070c0a124d29533396f79736c83 (patch) | |
| tree | 775b70c4b5b5dabba21009de3459091a5e94d6af /src/services | |
| parent | 3f42ed623adf591543bb8b738077e9172781ed09 (diff) | |
Cleanup code
Diffstat (limited to 'src/services')
| -rw-r--r-- | src/services/NotificationService.ts | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/services/NotificationService.ts b/src/services/NotificationService.ts index 2ffc85b2..ccaa9135 100644 --- a/src/services/NotificationService.ts +++ b/src/services/NotificationService.ts @@ -34,12 +34,7 @@ export const getNotificationsData: () => Promise<NotificationType[]> = } }; -export const getNotificationsUnreadCount: () => Promise<{ - CMT?: number; - FRD_REQ?: number; - P_VIEW?: number; - MOM_TAG?: number; -}> = async () => { +export const getNotificationsUnreadCount = async () => { try { const token = await AsyncStorage.getItem('token'); const response = await fetch(NOTIFICATIONS_COUNT_ENDPOINT, { @@ -70,11 +65,10 @@ export const getNotificationsUnreadCount: () => Promise<{ } return typedData; } - return []; } catch (error) { console.log('Unable to fetch notifications'); - return []; } + return undefined; }; export const setNotificationsReadDate: () => Promise<boolean> = async () => { |
