2019-12-25 20:17:14 +01:00
|
|
|
import React, { useState, useEffect } from 'react';
|
2020-05-24 11:17:26 +02:00
|
|
|
import { ScrollView, StyleSheet } from 'react-native';
|
2020-07-15 19:32:59 +02:00
|
|
|
import { SafeBlueArea, BlueCard, BlueNavigationStyle, BlueLoadingHook, BlueTextHooks } from '../../BlueComponents';
|
|
|
|
import { useTheme } from '@react-navigation/native';
|
2019-01-31 00:31:20 +01:00
|
|
|
/** @type {AppStorage} */
|
|
|
|
|
2019-12-25 20:17:14 +01:00
|
|
|
const ReleaseNotes = () => {
|
|
|
|
const [isLoading, setIsLoading] = useState(true);
|
|
|
|
const notes = require('../../release-notes');
|
2020-07-15 19:32:59 +02:00
|
|
|
const { colors } = useTheme();
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
root: {
|
|
|
|
flex: 1,
|
|
|
|
backgroundColor: colors.background,
|
|
|
|
},
|
|
|
|
});
|
2019-01-31 00:31:20 +01:00
|
|
|
|
2019-12-25 20:17:14 +01:00
|
|
|
useEffect(() => {
|
|
|
|
setIsLoading(false);
|
2020-03-18 12:56:59 +01:00
|
|
|
}, []);
|
2019-01-31 00:31:20 +01:00
|
|
|
|
2019-12-25 20:17:14 +01:00
|
|
|
return isLoading ? (
|
2020-07-15 19:32:59 +02:00
|
|
|
<BlueLoadingHook />
|
2019-12-25 20:17:14 +01:00
|
|
|
) : (
|
2020-05-24 11:17:26 +02:00
|
|
|
<SafeBlueArea forceInset={{ horizontal: 'always' }} style={styles.root}>
|
2019-12-25 20:17:14 +01:00
|
|
|
<ScrollView>
|
|
|
|
<BlueCard>
|
2020-07-15 19:32:59 +02:00
|
|
|
<BlueTextHooks>{notes}</BlueTextHooks>
|
2019-12-25 20:17:14 +01:00
|
|
|
</BlueCard>
|
|
|
|
</ScrollView>
|
2020-05-24 11:17:26 +02:00
|
|
|
</SafeBlueArea>
|
2019-12-25 20:17:14 +01:00
|
|
|
);
|
|
|
|
};
|
2019-01-31 00:31:20 +01:00
|
|
|
|
2019-12-25 20:17:14 +01:00
|
|
|
ReleaseNotes.navigationOptions = () => ({
|
|
|
|
...BlueNavigationStyle(),
|
|
|
|
title: 'Release notes',
|
|
|
|
});
|
2019-01-31 00:31:20 +01:00
|
|
|
|
2019-12-25 20:17:14 +01:00
|
|
|
export default ReleaseNotes;
|