Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Commit 532a06d

Browse files
committed
Dynamic version in HomeScreen
1 parent 43e23f6 commit 532a06d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/screens/Home/index.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import React, { useEffect, useContext } from 'react';
22
import { View } from 'react-native';
3+
import PropTypes from 'prop-types';
34
import { useDynamicStyleSheet } from 'react-native-dark-mode';
45
import { useIsFocused } from 'react-navigation-hooks';
5-
import PropTypes from 'prop-types';
6+
import DeviceInfo from 'react-native-device-info';
67
import { TouchNative } from 'rn-hgl';
78

89
import { SettingsContext } from 'contexts/Settings';
@@ -29,6 +30,7 @@ function HomeScreen({ navigation }) {
2930
state.player.pause();
3031
}
3132
}, [isFocused]);
33+
3234
return (
3335
<PageView navigation={navigation} style={styles.container} baseStyle={styles.screen}>
3436
<Text style={styles.title}>Welcome</Text>
@@ -44,7 +46,7 @@ function HomeScreen({ navigation }) {
4446
</TouchNative>
4547
))}
4648
</View>
47-
<Text style={styles.version}>VERSION 1.0.0</Text>
49+
<Text style={styles.version}>VERSION {DeviceInfo.getVersion()}</Text>
4850
</PageView>
4951
);
5052
}

0 commit comments

Comments
 (0)