notifications ok

This commit is contained in:
2025-10-07 17:02:12 +02:00
parent a4dca1d4f0
commit c1171ad9e9
8 changed files with 174 additions and 46 deletions
+11 -5
View File
@@ -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>