import { Image, Pressable, Text, View } from "react-native"; import React from "reactn"; import { responsiveWidth } from "../actions/responsiveSizes.js"; import { icons } from "../assets"; import { Fonts, Style, gutters } from "../styles"; import { Routes } from "../navigation"; import { navigate } from "../navigation/NavigationService"; import useLayoutType, { sidebarWidth } from "../hooks/useLayoutType.js"; import useNotifications from "../hooks/useNotifications"; export default ({ title = "", containerStyle = {}, bell = false }) => { const { isDesktop } = useLayoutType(); const notificationsContext = useNotifications(); const unreadCount = notificationsContext?.unreadCount || 0; const hasUnread = unreadCount > 0; return ( {title} navigate(Routes.Notifications)}> {bell && ( )} {hasUnread ? ( ) : null} ); };