From 2350490e8431b751bf121c33a8b90cacc0f0bbc5 Mon Sep 17 00:00:00 2001 From: Ritesh Shukla Date: Wed, 29 Oct 2025 20:58:37 +0530 Subject: [PATCH] And OTA Version to Info Tab in Settings (#617) --- .../Settings/components/info-tab.tsx | 51 +++++++++++-------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/src/components/Settings/components/info-tab.tsx b/src/components/Settings/components/info-tab.tsx index 031e2ede..a5eca38b 100644 --- a/src/components/Settings/components/info-tab.tsx +++ b/src/components/Settings/components/info-tab.tsx @@ -2,7 +2,7 @@ import { version } from '../../../../package.json' import { Text } from '../../Global/helpers/text' import SettingsListGroup from './settings-list-group' import { Linking } from 'react-native' -import { ScrollView, XStack } from 'tamagui' +import { ScrollView, XStack, YStack } from 'tamagui' import Icon from '../../Global/components/icon' import usePatrons from '../../../api/queries/patrons' import { useQuery } from '@tanstack/react-query' @@ -10,7 +10,7 @@ import INFO_CAPTIONS from '../utils/info-caption' import { ONE_HOUR } from '../../../constants/query-client' import { pickRandomItemFromArray } from '../../../utils/random' import { FlashList } from '@shopify/flash-list' - +import { getStoredOtaVersion } from 'react-native-nitro-ota' export default function InfoTab() { const patrons = usePatrons() @@ -20,7 +20,8 @@ export default function InfoTab() { staleTime: ONE_HOUR, initialData: 'Live and in stereo', }) - + const otaVersion = getStoredOtaVersion() + const otaVersionText = otaVersion ? `OTA Version: ${otaVersion}` : '' return ( - - Linking.openURL('https://github.com/Jellify-Music/App') - } - > - - View Source + + {otaVersionText && ( + + {otaVersionText} + + )} + + + + Linking.openURL('https://github.com/Jellify-Music/App') + } + > + + View Source + + + Linking.openURL('https://discord.gg/yf8fBatktn') + } + > + + Join Discord + - Linking.openURL('https://discord.gg/yf8fBatktn')} - > - - Join Discord - - + ), }, {