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

Commit

Permalink
Dynamic version in HomeScreen
Browse files Browse the repository at this point in the history
  • Loading branch information
hmziqrs committed Apr 4, 2020
1 parent 43e23f6 commit 532a06d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/screens/Home/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React, { useEffect, useContext } from 'react';
import { View } from 'react-native';
import PropTypes from 'prop-types';
import { useDynamicStyleSheet } from 'react-native-dark-mode';
import { useIsFocused } from 'react-navigation-hooks';
import PropTypes from 'prop-types';
import DeviceInfo from 'react-native-device-info';
import { TouchNative } from 'rn-hgl';

import { SettingsContext } from 'contexts/Settings';
Expand All @@ -29,6 +30,7 @@ function HomeScreen({ navigation }) {
state.player.pause();
}
}, [isFocused]);

return (
<PageView navigation={navigation} style={styles.container} baseStyle={styles.screen}>
<Text style={styles.title}>Welcome</Text>
Expand All @@ -44,7 +46,7 @@ function HomeScreen({ navigation }) {
</TouchNative>
))}
</View>
<Text style={styles.version}>VERSION 1.0.0</Text>
<Text style={styles.version}>VERSION {DeviceInfo.getVersion()}</Text>
</PageView>
);
}
Expand Down

0 comments on commit 532a06d

Please sign in to comment.