From 6351130ec8e716c16eb66774e795d62c39554aa9 Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Fri, 9 Sep 2022 14:54:45 -0600 Subject: [PATCH] Comment cleanup, lint --- functions/src/emails.ts | 4 ++-- web/hooks/use-notifications.ts | 26 -------------------------- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/functions/src/emails.ts b/functions/src/emails.ts index 3d780b25..e4e5a540 100644 --- a/functions/src/emails.ts +++ b/functions/src/emails.ts @@ -219,7 +219,7 @@ export const sendOneWeekBonusEmail = async ( ) return - const { name, id: userId } = user + const { name } = user const firstName = name.split(' ')[0] const unsubscribeLink = `${DOMAIN}/notifications?section=${ @@ -252,7 +252,7 @@ export const sendCreatorGuideEmail = async ( ) return - const { name, id: userId } = user + const { name } = user const firstName = name.split(' ')[0] const unsubscribeLink = `${DOMAIN}/notifications?section=${ diff --git a/web/hooks/use-notifications.ts b/web/hooks/use-notifications.ts index 00672a1a..d8ce025e 100644 --- a/web/hooks/use-notifications.ts +++ b/web/hooks/use-notifications.ts @@ -108,29 +108,3 @@ export function groupNotifications(notifications: Notification[]) { }) return notificationGroups } - -// const lessPriorityReasons = [ -// 'on_contract_with_users_comment', -// 'on_contract_with_users_answer', -// // Notifications not currently generated for users who've sold their shares -// 'on_contract_with_users_shares_out', -// // Not sure if users will want to see these w/ less: -// // 'on_contract_with_users_shares_in', -// ] - -// function getAppropriateNotifications( -// notifications: Notification[], -// notificationPreferences?: notification_subscribe_types -// ) { -// if (notificationPreferences === 'all') return notifications -// if (notificationPreferences === 'less') -// return notifications.filter( -// (n) => -// n.reason && -// // Show all contract notifications and any that aren't in the above list: -// (n.sourceType === 'contract' || !lessPriorityReasons.includes(n.reason)) -// ) -// if (notificationPreferences === 'none') return [] -// -// return notifications -// }