add version number to about setion

This commit is contained in:
austinried 2021-08-27 09:58:49 +09:00
parent 36e97cb621
commit 77e89fc9e2
2 changed files with 14 additions and 1 deletions

View File

@ -17,6 +17,7 @@ import React, { useCallback, useState } from 'react'
import { KeyboardTypeOptions, Linking, Modal, Pressable, StatusBar, StyleSheet, Text, View } from 'react-native'
import { ScrollView } from 'react-native-gesture-handler'
import Icon from 'react-native-vector-icons/MaterialCommunityIcons'
import { version } from '../../package.json'
const ServerItem = React.memo<{
server: Server
@ -286,6 +287,9 @@ const SettingsContent = React.memo(() => {
buttonStyle="hollow"
/>
<Header style={styles.header}>About</Header>
<Text style={styles.text}>
<Text style={styles.bold}>Subtracks</Text> version {version}
</Text>
<Button
disabled={clearing}
style={styles.button}
@ -396,6 +400,14 @@ const styles = StyleSheet.create({
modalTextSubmit: {
marginLeft: 15,
},
text: {
color: 'white',
fontFamily: font.regular,
fontSize: 16,
},
bold: {
fontFamily: font.bold,
},
})
export default Settings

View File

@ -46,7 +46,7 @@
"allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */,
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
"skipLibCheck": false /* Skip type checking of declaration files. */
"skipLibCheck": false /* Skip type checking of declaration files. */,
/* Source Map Options */
// "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
@ -57,6 +57,7 @@
/* Experimental Options */
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
"resolveJsonModule": true
},
"exclude": ["node_modules", "babel.config.js", "metro.config.js", "jest.config.js"]
}