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

CaptainFact / captain-fact-frontend / 20191038404

13 Dec 2025 10:53AM UTC coverage: 3.197% (+0.3%) from 2.865%
20191038404

push

github

Betree
iterate

38 of 2113 branches covered (1.8%)

Branch coverage included in aggregate %.

0 of 243 new or added lines in 23 files covered. (0.0%)

195 existing lines in 20 files now uncovered.

125 of 2985 relevant lines covered (4.19%)

0.12 hits per line

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

0.0
/app/components/LoggedInUser/NotificationBell.jsx
1
import { useQuery } from '@apollo/client'
2
import { get } from 'lodash'
3
import React from 'react'
4
import { Bell } from 'styled-icons/fa-solid'
5

6
import { loggedInUserUnreadNotificationsCount } from '../../API/graphql_queries'
7
import { Badge } from '../ui/badge'
8
import { Button } from '../ui/button'
9

NEW
10
const NotificationBell = (props, ref) => {
×
NEW
11
  const { data } = useQuery(loggedInUserUnreadNotificationsCount, {
×
12
    fetchPolicy: 'network-only',
13
    pollInterval: 15000,
14
  })
15

NEW
16
  const unreadCount = get(data, 'loggedInUser.notifications.totalEntries', 0)
×
17

NEW
18
  return (
×
19
    <Button variant="ghost" {...props} ref={ref}>
20
      <div className="relative">
21
        <Bell size={24} />
22
        {unreadCount > 0 && (
×
23
          <Badge variant="destructive" className="absolute -top-2 -right-2 py-[2px] px-1 text-xs">
24
            {unreadCount}
25
          </Badge>
26
        )}
27
      </div>
28
    </Button>
29
  )
30
}
31

32
export default React.forwardRef(NotificationBell)
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

© 2026 Coveralls, Inc