All files / app/src/entities/notifications/ui/notifications-header-title notifications-header-title.tsx

100% Statements 10/10
50% Branches 1/2
100% Functions 1/1
100% Lines 10/10

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 171x           1x 2x 2x 2x 2x 2x 2x 2x   2x  
import { FC } from 'react'
import { useTranslate } from '@/shared/lib'
import { NotificationsSettings } from '@/entities/notification'
import { useAtomValue } from 'jotai'
import { VIEWER_PRIMARY_KEY, viewerAtom } from '@/entities/viewer'
 
export const NotificationsHeaderTitle: FC = () => {
  const { t } = useTranslate(['common'])
  const viewer = useAtomValue(viewerAtom)
  return (
    <div className='flex items-center gap-x-2.5'>
      <h1>{t('Notifications')}</h1>
      {viewer && <NotificationsSettings user={viewer} invalidateKey={VIEWER_PRIMARY_KEY} />}
    </div>
  )
}