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

Use proper environment mapping

This commit is contained in:
Zhiyuan Zheng
2022-01-02 22:28:33 +01:00
parent 22af0bf828
commit 013d55aee2
10 changed files with 99 additions and 40 deletions

View File

@ -4,7 +4,6 @@ import { MenuContainer, MenuRow } from '@components/Menu'
import { useNavigation } from '@react-navigation/native'
import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager'
import * as Updates from 'expo-updates'
import * as Linking from 'expo-linking'
import * as StoreReview from 'expo-store-review'
import * as WebBrowser from 'expo-web-browser'
@ -12,6 +11,7 @@ import React from 'react'
import { useTranslation } from 'react-i18next'
import { useSelector } from 'react-redux'
import { getInstanceActive } from '@utils/slices/instancesSlice'
import { isCandidate, isDevelopment } from '@utils/checkEnvironment'
const SettingsTooot: React.FC = () => {
const instanceActive = useSelector(getInstanceActive)
@ -36,10 +36,7 @@ const SettingsTooot: React.FC = () => {
Linking.openURL('https://www.buymeacoffee.com/xmflsct')
}}
/>
{__DEV__ ||
['release', 'development'].some(channel =>
Updates.releaseChannel?.includes(channel)
) ? (
{isDevelopment || isCandidate ? (
<MenuRow
title={t('me.settings.review.heading')}
content={