1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Added fastlane and other updates

This commit is contained in:
Zhiyuan Zheng
2021-01-31 03:09:35 +01:00
parent 253ddee319
commit 1072d88191
43 changed files with 755 additions and 185 deletions

View File

@@ -8,15 +8,23 @@ const Collections: React.FC = () => {
const { t, i18n } = useTranslation('meRoot')
const navigation = useNavigation()
const { data, isFetching } = useAnnouncementQuery({ showAll: true })
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 })
if (data.length === 0) {
return t('content.collections.announcements.content.empty')
} else {
return t('content.collections.announcements.content.read')
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, i18n.language])
@@ -49,7 +57,7 @@ const Collections: React.FC = () => {
/>
<MenuRow
iconFront='Clipboard'
iconBack='ChevronRight'
iconBack={data && data.length === 0 ? undefined : 'ChevronRight'}
title={t('content.collections.announcements.heading')}
content={announcementContent}
loading={isFetching}