notifications ok
This commit is contained in:
@@ -9,9 +9,13 @@ 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 = {} }) => {
|
||||
const { isDesktop } = useLayoutType();
|
||||
const notificationsContext = useNotifications();
|
||||
const unreadCount = notificationsContext?.unreadCount || 0;
|
||||
const hasUnread = unreadCount > 0;
|
||||
|
||||
return (
|
||||
<View
|
||||
@@ -49,11 +53,13 @@ export default ({ title = "", containerStyle = {} }) => {
|
||||
}}
|
||||
/>
|
||||
|
||||
<View
|
||||
style={{
|
||||
...Style.itemBadge,
|
||||
}}
|
||||
/>
|
||||
{hasUnread ? (
|
||||
<View
|
||||
style={{
|
||||
...Style.itemBadge,
|
||||
}}
|
||||
/>
|
||||
) : null}
|
||||
</Pressable>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user