From b747cf65d95bf88679156b4f28684a67db8572c6 Mon Sep 17 00:00:00 2001 From: Dahyun Yu Date: Wed, 11 Dec 2024 08:32:54 +0900 Subject: [PATCH] chore: delete console.debug in display-store (#5200) * chore: delete console.debug in display-store Signed-off-by: yuda * refactor: replace console.error with errorHandler Signed-off-by: yuda --------- Signed-off-by: yuda --- apps/web/src/store/display/display-store.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/apps/web/src/store/display/display-store.ts b/apps/web/src/store/display/display-store.ts index 2084fc09c0..87c8f12f49 100644 --- a/apps/web/src/store/display/display-store.ts +++ b/apps/web/src/store/display/display-store.ts @@ -217,11 +217,9 @@ export const useDisplayStore = defineStore('display-store', () => { let notificationListApiToken: CancelTokenSource | undefined; const checkNotification = async (): Promise => { if (notificationListApiToken) { - console.debug('[CHECK NOTI]', ' pending...'); return; } try { - console.debug('[CHECK NOTI]', ' start'); notificationListApiToken = axios.CancelToken.source(); const currentTime = dayjs.tz(dayjs.utc(), userStore.state.timezone); @@ -232,7 +230,6 @@ export const useDisplayStore = defineStore('display-store', () => { currentTime, lastNotificationReadTime, ); - console.debug('[NOTI QUERY.FILTER]', param.query.filter); const { total_count } = await SpaceConnector.clientV2.notification.notification.list>(param, { cancelToken: notificationListApiToken.token, }); @@ -246,20 +243,17 @@ export const useDisplayStore = defineStore('display-store', () => { } } finally { notificationListApiToken = undefined; - console.debug('[CHECK NOTI]', ' finished'); } }; let checkNotificationInterval: undefined|ReturnType; const stopCheckNotification = (): void => { if (notificationListApiToken) { - console.debug('[NOTI API]', 'canceled'); notificationListApiToken.cancel(); notificationListApiToken = undefined; } if (checkNotificationInterval) { - console.debug('[NOTI INTERVAL]', 'stopped'); clearInterval(checkNotificationInterval); checkNotificationInterval = undefined; } @@ -267,15 +261,12 @@ export const useDisplayStore = defineStore('display-store', () => { const startCheckNotification = (): void => { if (notificationListApiToken) { - console.debug('[NOTI API]', 'previous canceled'); notificationListApiToken.cancel(); notificationListApiToken = undefined; } if (checkNotificationInterval) { - console.debug('[NOTI INTERVAL]', 'previous stopped'); clearInterval(checkNotificationInterval); } else { - console.debug('[NOTI INTERVAL]', 'start'); checkNotification(); } @@ -293,7 +284,7 @@ export const useDisplayStore = defineStore('display-store', () => { state.gnbNotificationLastReadTime = settings.global.gnbNotificationLastReadTime; } } catch (e) { - console.error(e); + ErrorHandler.handleError(e); LocalStorageAccessor.removeItem(userId); } };