import React, { useEffect, useState } from 'react'; import { ScrollView, Linking, Dimensions } from 'react-native'; import { useNavigation } from 'react-navigation-hooks'; import { BlueTextCentered, BlueLoading, BlueSpacing20, BlueButton, SafeBlueArea, BlueCard, BlueText, BlueNavigationStyle, } from '../../BlueComponents'; import { getApplicationName, getVersion, getBundleId, getBuildNumber } from 'react-native-device-info'; import Rate, { AndroidMarket } from 'react-native-rate'; /** @type {AppStorage} */ const BlueApp = require('../../BlueApp'); const { width, height } = Dimensions.get('window'); const loc = require('../../loc/'); const About = () => { const [isLoading, setIsLoading] = useState(true); const { navigate } = useNavigation(); useEffect(() => { setIsLoading(false); }); const handleOnReleaseNotesPress = () => { navigate('ReleaseNotes'); }; const handleOnSelfTestPress = () => { navigate('Selftest'); }; const handleOnTwitterPress = () => { Linking.openURL('https://twitter.com/bluewalletio'); }; const handleOnGithubPress = () => { Linking.openURL('https://github.com/BlueWallet/BlueWallet'); }; const handleOnTelegramPress = () => { Linking.openURL('https://t.me/bluewallet'); }; const handleOnRatePress = () => { const options = { AppleAppID: '1376878040', GooglePackageName: 'io.bluewallet.bluewallet', preferredAndroidMarket: AndroidMarket.Google, preferInApp: true, openAppStoreIfInAppFails: true, fallbackPlatformURL: 'https://bluewallet.io', }; Rate.rate(options, success => { if (success) { console.log('User Rated.'); } }); }; return isLoading ? ( ) : ( BlueWallet is a free and open source Bitcoin wallet. Licensed MIT. Always backup your keys Built with awesome: * React Native * bitcoinjs-lib * Nodejs * Electrum server {getApplicationName()} ver {getVersion()} (build {getBuildNumber()}) {new Date(getBuildNumber() * 1000).toGMTString()} {getBundleId()} w, h = {width}, {height} ); }; About.navigationOptions = () => ({ ...BlueNavigationStyle(), title: loc.settings.about, }); export default About;