2020-03-30 19:20:50 +00:00
|
|
|
import React from 'react';
|
2021-08-20 00:01:17 +00:00
|
|
|
import { StyleSheet, Text, View } from 'react-native';
|
2020-03-30 19:20:50 +00:00
|
|
|
|
|
|
|
import { themes } from '../constants/colors';
|
|
|
|
import sharedStyles from '../views/Styles';
|
|
|
|
import { getReadableVersion } from '../utils/deviceInfo';
|
|
|
|
import I18n from '../i18n';
|
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
container: {
|
|
|
|
alignItems: 'center',
|
2021-08-20 00:01:17 +00:00
|
|
|
justifyContent: 'flex-end',
|
2020-03-30 19:20:50 +00:00
|
|
|
},
|
|
|
|
text: {
|
|
|
|
...sharedStyles.textRegular,
|
2021-08-20 00:01:17 +00:00
|
|
|
fontSize: 13,
|
2020-03-30 19:20:50 +00:00
|
|
|
},
|
|
|
|
bold: {
|
2021-08-20 00:01:17 +00:00
|
|
|
...sharedStyles.textSemibold,
|
|
|
|
},
|
2020-03-30 19:20:50 +00:00
|
|
|
});
|
|
|
|
|
2021-07-19 19:52:45 +00:00
|
|
|
const AppVersion = React.memo(({ theme }: {theme: string}) => (
|
2020-03-30 19:20:50 +00:00
|
|
|
<View style={styles.container}>
|
|
|
|
<Text style={[styles.text, { color: themes[theme].auxiliaryText }]}>{I18n.t('Version_no', { version: '' })}<Text style={styles.bold}>{getReadableVersion}</Text></Text>
|
|
|
|
</View>
|
|
|
|
));
|
|
|
|
|
|
|
|
export default AppVersion;
|