BlueWallet/screen/lnd/lndViewAdditionalInvoicePreImage.js

51 lines
1.5 KiB
JavaScript
Raw Normal View History

2020-11-27 22:24:20 -05:00
import React from 'react';
import { View, StyleSheet } from 'react-native';
2020-12-04 13:39:47 +00:00
import { useRoute, useTheme } from '@react-navigation/native';
2020-12-04 12:50:23 +03:00
2020-12-25 19:09:53 +03:00
import { BlueCopyTextToClipboard, SafeBlueArea, BlueSpacing20, BlueTextCentered } from '../../BlueComponents';
import navigationStyle from '../../components/navigationStyle';
import loc from '../../loc';
2021-08-26 21:31:36 -04:00
import QRCodeComponent from '../../components/QRCodeComponent';
2020-12-25 19:09:53 +03:00
2020-11-27 22:24:20 -05:00
const LNDViewAdditionalInvoicePreImage = () => {
// state = { walletInfo: undefined };
const { colors } = useTheme();
const { preImageData } = useRoute().params;
const stylesHook = StyleSheet.create({
root: {
backgroundColor: colors.elevated,
},
});
return (
<SafeBlueArea style={stylesHook.root}>
2020-11-27 22:24:20 -05:00
<View style={styles.wrapper}>
<BlueTextCentered>{loc.lndViewInvoice.preimage}:</BlueTextCentered>
<BlueSpacing20 />
<View style={styles.qrCodeContainer}>
2021-08-26 21:31:36 -04:00
<QRCodeComponent value={preImageData} size={300} logoSize={90} />
2020-11-27 22:24:20 -05:00
</View>
<BlueSpacing20 />
<BlueCopyTextToClipboard text={preImageData} />
</View>
</SafeBlueArea>
);
};
const styles = StyleSheet.create({
wrapper: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
qrCodeContainer: {
justifyContent: 'center',
alignItems: 'center',
marginHorizontal: 16,
},
});
export default LNDViewAdditionalInvoicePreImage;
2021-02-15 11:03:54 +03:00
LNDViewAdditionalInvoicePreImage.navigationOptions = navigationStyle({}, opts => ({ ...opts, title: loc.lndViewInvoice.additional_info }));