Skip to content

Commit

Permalink
fix: type
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Burtey committed Oct 19, 2023
1 parent dd3792e commit 5141d3a
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions app/components/notification/notification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,13 @@ export const NotificationComponent = (): JSX.Element => {
)
}

const notificationType = remoteMessage.data?.notificationType
if (notificationType) {
switch (true) {
case circlesNotificationTypes.includes(notificationType):
primaryNavigation.navigate("People")
setTimeout(() => circlesNavigation.navigate("circlesDashboard"), 200)
break
}
const notificationType = remoteMessage.data?.notificationType ?? ""
if (
typeof notificationType === "string" &&
circlesNotificationTypes.includes(notificationType)
) {
primaryNavigation.navigate("People")
setTimeout(() => circlesNavigation.navigate("circlesDashboard"), 200)
}
}

Expand Down

0 comments on commit 5141d3a

Please sign in to comment.