Skip to content

Commit

Permalink
yarn prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Apr 19, 2020
1 parent 942bc49 commit fee17fb
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions docs/src/modules/components/Notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,18 @@ export default function Notifications() {
const messages = useSelector((state) => state.notifications.messages);
const lastSeen = useSelector((state) => state.notifications.lastSeen);

const messageList = (messages || []).filter((message) => {
if (
message.userLanguage &&
message.userLanguage !== userLanguage &&
message.userLanguage !== navigator.language.substring(0, 2)
) {
return false;
}
return true;
}).reverse();
const messageList = (messages || [])
.filter((message) => {
if (
message.userLanguage &&
message.userLanguage !== userLanguage &&
message.userLanguage !== navigator.language.substring(0, 2)
) {
return false;
}
return true;
})
.reverse();

const unseenNotificationsCount = messageList.reduce(
(count, message) => (message.id > lastSeen ? count + 1 : count),
Expand Down

0 comments on commit fee17fb

Please sign in to comment.