• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

alkem-io / client-web / #9533

05 Dec 2024 02:27PM UTC coverage: 5.947%. First build
#9533

Pull #7254

travis-ci

Pull Request #7254: In-app Notifications v1 for Beta Testers

194 of 10628 branches covered (1.83%)

Branch coverage included in aggregate %.

40 of 177 new or added lines in 15 files covered. (22.6%)

1532 of 18394 relevant lines covered (8.33%)

0.19 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/ui/platformNavigation/PlatformNotificationsButton.tsx
1
import { IconButton, Paper } from '@mui/material';
2
import NotificationsNoneOutlinedIcon from '@mui/icons-material/NotificationsNoneOutlined';
3
import { useTranslation } from 'react-i18next';
4
import BadgeCounter from '@/core/ui/icon/BadgeCounter';
5
import { useInAppNotifications } from '@/main/inAppNotifications/useInAppNotifications';
6
import { useInAppNotificationsContext } from '@/main/inAppNotifications/InAppNotificationsContext';
7

8
export const PlatformNotificationsButton = () => {
NEW
9
  const { isEnabled, setIsOpen } = useInAppNotificationsContext();
×
NEW
10
  const { unreadCount } = useInAppNotifications();
×
NEW
11
  const { t } = useTranslation();
×
NEW
12

×
13
  const openNotifications = () => {
NEW
14
    setIsOpen(true);
×
NEW
15
  };
×
16

17
  if (!isEnabled) {
NEW
18
    return null;
×
19
  }
NEW
20

×
NEW
21
  return (
×
22
    <Paper
23
      component={IconButton}
NEW
24
      onClick={openNotifications}
×
25
      color="primary"
26
      aria-label={t('buttons.notifications')}
27
      sx={{
28
        position: 'relative',
29
        overflow: 'visible',
30
        '&:hover': {
31
          background: theme => theme.palette.background.paper,
32
          opacity: 0.9,
33
        },
NEW
34
      }}
×
35
    >
36
      <NotificationsNoneOutlinedIcon />
37
      {unreadCount > 0 && (
38
        <BadgeCounter count={unreadCount} size="small" sx={{ position: 'absolute', top: -4, right: -4 }} />
39
      )}
40
    </Paper>
×
41
  );
42
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc