2020-03-30 19:20:50 +00:00
|
|
|
import React from 'react';
|
2021-09-13 20:41:05 +00:00
|
|
|
import { StyleSheet, Text, View } from 'react-native';
|
2020-03-30 19:20:50 +00:00
|
|
|
|
2022-04-07 14:10:03 +00:00
|
|
|
import { themes } from '../lib/constants';
|
2020-03-30 19:20:50 +00:00
|
|
|
import sharedStyles from '../views/Styles';
|
2022-06-06 14:17:51 +00:00
|
|
|
import { getReadableVersion } from '../lib/methods/helpers';
|
2020-03-30 19:20:50 +00:00
|
|
|
import I18n from '../i18n';
|
2022-04-12 16:27:05 +00:00
|
|
|
import { TSupportedThemes } from '../theme';
|
2020-03-30 19:20:50 +00:00
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
container: {
|
|
|
|
alignItems: 'center',
|
|
|
|
justifyContent: 'flex-end'
|
|
|
|
},
|
|
|
|
text: {
|
|
|
|
...sharedStyles.textRegular,
|
|
|
|
fontSize: 13
|
|
|
|
},
|
|
|
|
bold: {
|
|
|
|
...sharedStyles.textSemibold
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2022-04-12 16:27:05 +00:00
|
|
|
const AppVersion = React.memo(({ theme }: { theme: TSupportedThemes }) => (
|
2020-03-30 19:20:50 +00:00
|
|
|
<View style={styles.container}>
|
2024-04-18 10:19:54 +00:00
|
|
|
<Text style={[styles.text, { color: themes[theme].fontSecondaryInfo }]}>
|
2021-09-13 20:41:05 +00:00
|
|
|
{I18n.t('Version_no', { version: '' })}
|
|
|
|
<Text style={styles.bold}>{getReadableVersion}</Text>
|
|
|
|
</Text>
|
2020-03-30 19:20:50 +00:00
|
|
|
</View>
|
|
|
|
));
|
|
|
|
|
|
|
|
export default AppVersion;
|