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';
|
|
|
|
import { getReadableVersion } from '../utils/deviceInfo';
|
|
|
|
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}>
|
2021-09-13 20:41:05 +00:00
|
|
|
<Text style={[styles.text, { color: themes[theme].auxiliaryText }]}>
|
|
|
|
{I18n.t('Version_no', { version: '' })}
|
|
|
|
<Text style={styles.bold}>{getReadableVersion}</Text>
|
|
|
|
</Text>
|
2020-03-30 19:20:50 +00:00
|
|
|
</View>
|
|
|
|
));
|
|
|
|
|
|
|
|
export default AppVersion;
|