import { MenuContainer, MenuRow } from '@components/Menu' import { useNavigation } from '@react-navigation/native' import { useAnnouncementQuery } from '@utils/queryHooks/announcement' import React, { useMemo } from 'react' import { useTranslation } from 'react-i18next' const Collections: React.FC = () => { const { t } = useTranslation('meRoot') const navigation = useNavigation() const { data, isFetching } = useAnnouncementQuery({ showAll: true }) const announcementContent = useMemo(() => { if (data) { const amount = data.filter(announcement => !announcement.read).length if (amount) { return t('content.collections.announcements.content.unread', { amount }) } else { return t('content.collections.announcements.content.read') } } }, [data]) return ( navigation.navigate('Screen-Me-Conversations')} /> navigation.navigate('Screen-Me-Bookmarks')} /> navigation.navigate('Screen-Me-Favourites')} /> navigation.navigate('Screen-Me-Lists')} /> data && data.length && navigation.navigate('Screen-Shared-Announcements', { showAll: true }) } /> ) } export default Collections