Skip to content

Commit

Permalink
refactor: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
RabeeAbuBaker committed Oct 12, 2023
1 parent cfdf780 commit 18e76b9
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,11 @@ export default function AppNotificationsAlert({
const notificationEvents = notifications[0]?.appNotification?.events

const getNotificationCheckedState = useCallback(
(level: NotificationLevel) => {
console.log(notificationEvents[level])
return Object.keys(notificationEvents).length > 0 &&
notificationEvents.hasOwnProperty(level)
(level: NotificationLevel) =>
Object.keys(notificationEvents).length > 0 &&
notificationEvents.hasOwnProperty(level)
? (notificationEvents[level] as boolean)
: DEFAULT_ALERT_PERCENTAGES[level]
},
: DEFAULT_ALERT_PERCENTAGES[level],
[notificationEvents],
)

Expand Down

0 comments on commit 18e76b9

Please sign in to comment.