mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Partially fixed #113
This commit is contained in:
32
src/screens/Tabs/Me/Root/Update.tsx
Normal file
32
src/screens/Tabs/Me/Root/Update.tsx
Normal file
@ -0,0 +1,32 @@
|
||||
import { MenuContainer, MenuRow } from '@components/Menu'
|
||||
import { getVersionUpdate } from '@utils/slices/versionSlice'
|
||||
import React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { Linking, Platform } from 'react-native'
|
||||
import { useSelector } from 'react-redux'
|
||||
|
||||
const Update: React.FC = () => {
|
||||
const { t } = useTranslation('screenTabs')
|
||||
|
||||
const versionUpdate = useSelector(getVersionUpdate)
|
||||
|
||||
return versionUpdate ? (
|
||||
<MenuContainer>
|
||||
<MenuRow
|
||||
iconFront='ChevronsUp'
|
||||
iconBack='ExternalLink'
|
||||
title={t('me.root.update.title')}
|
||||
badge
|
||||
onPress={() => {
|
||||
if (Platform.OS === 'ios') {
|
||||
Linking.openURL('itms-appss://itunes.apple.com/app/id1549772269')
|
||||
} else {
|
||||
Linking.openURL('https://tooot.app')
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</MenuContainer>
|
||||
) : null
|
||||
}
|
||||
|
||||
export default Update
|
Reference in New Issue
Block a user