BlueWallet/screen/settings/releasenotes.js

33 lines
819 B
JavaScript
Raw Normal View History

2019-12-25 13:17:14 -06:00
import React, { useState, useEffect } from 'react';
2019-01-30 23:31:20 +00:00
import { ScrollView } from 'react-native';
import { BlueLoading, SafeBlueArea, BlueCard, BlueText, BlueNavigationStyle } from '../../BlueComponents';
/** @type {AppStorage} */
2019-12-25 13:17:14 -06:00
const ReleaseNotes = () => {
const [isLoading, setIsLoading] = useState(true);
const notes = require('../../release-notes');
2019-01-30 23:31:20 +00:00
2019-12-25 13:17:14 -06:00
useEffect(() => {
setIsLoading(false);
});
2019-01-30 23:31:20 +00:00
2019-12-25 13:17:14 -06:00
return isLoading ? (
(<BlueLoading />)
) : (
(<SafeBlueArea forceInset={{ horizontal: 'always' }} style={{ flex: 1 }}>
<ScrollView>
<BlueCard>
<BlueText>{notes}</BlueText>
</BlueCard>
</ScrollView>
</SafeBlueArea>)
);
};
2019-01-30 23:31:20 +00:00
2019-12-25 13:17:14 -06:00
ReleaseNotes.navigationOptions = () => ({
...BlueNavigationStyle(),
title: 'Release notes',
});
2019-01-30 23:31:20 +00:00
2019-12-25 13:17:14 -06:00
export default ReleaseNotes;