render app version in admin screen

This commit is contained in:
Roland Osborne 2022-11-28 12:08:00 -08:00
parent fc5415eb3f
commit 1d33e39a78
5 changed files with 18 additions and 2 deletions

View File

@ -669,7 +669,7 @@ SPEC CHECKSUMS:
FirebaseInstallations: 99d24bac0243cf8b0e96cf5426340d211f0bcc80
FirebaseMessaging: 4487bbff9b9b927ba1dd3ea40d1ceb58e4ee3cb5
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
glog: 3d02b25ca00c2d456734d0bcff864cbc62f6ae1a
GoogleDataTransport: 1c8145da7117bd68bbbed00cf304edb6a24de00f
GoogleUtilities: 1d20a6ad97ef46f67bbdec158ce00563a671ebb7
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431

View File

@ -69,6 +69,9 @@ export function Admin() {
</View>
)}
</View>
<View style={styles.version}>
<Text style={styles.versiontext}>v{ state.version }</Text>
</View>
</View>
</KeyboardAvoidingView>
);

View File

@ -108,6 +108,13 @@ export const styles = StyleSheet.create({
nologintext: {
color: Colors.disabled,
},
version: {
display: 'flex',
alignItems: 'flex-end',
},
versiontext: {
color: Colors.grey,
fontSize: 14,
},
})

View File

@ -17,12 +17,17 @@ export function useAdmin() {
server: null,
token: null,
plainText: false,
version: null,
});
const updateState = (value) => {
setState((s) => ({ ...s, ...value }));
}
useEffect(() => {
updateState({ version: app.state.version });
}, [app]);
const checkStatus = async () => {
try {
updateState({ unclaimed: status });

View File

@ -21,6 +21,7 @@ export function useAppContext() {
disconnected: null,
deviceToken: null,
loggingOut: false,
version: getVersion(),
});
const store = useContext(StoreContext);
const account = useContext(AccountContext);